Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8118147

-fx-highlight-text-fill does not work for TextField / PasswordField

    XMLWordPrintable

    Details

      Description

      The following code demonstrates this problem:


      public class HelloTextField extends Application {
          private Group content;
          private String sourceBorder = HelloTextField.class.getResource("border.png").toExternalForm();

          @Override
          public void start(Stage stage) throws Exception {
              stage.setScene(new Scene(content = new Group(), 500, 500));
              stage.centerOnScreen();
              stage.show();

              final TextField label = new TextField();
              label.setPromptText("Enter Pithy Pun");

              label.setStyle("-fx-text-fill:green;"
                      + "-fx-prompt-text-fill: blue;"
                      + "-fx-highlight-fill: yellow;"
                      + "-fx-highlight-text-fill: red;"
                      );
              content.getChildren().add(label);
          }


          public static void main(String[] args) {
              Application.launch(HelloTextField.class, args);
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              thor Thor Johannesson (Inactive)
              Reporter:
              rbair Richard Bair (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: