- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    fx2.0
                    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);
}
}
            
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);
}
}
- is blocked by
- 
                    JDK-8128071 Updating selected text in textfield throws exception -           
- Closed
 
-         
- 
                    JDK-8116220 Text does not clear selection on Text.setText(...) -           
- Closed
 
-         
- relates to
- 
                    JDK-8128574 TextArea does not set selection fill color -           
- Closed
 
-         
- 
                    JDK-8116106 -fx-highlight-text-fill does not work for multi-line text node -           
- Closed
 
-         
- 
                    JDK-8128086 fx2.1-15 (b01): up to 90% regression in Controls.TextArea-select_all-255x1000 in j2d pipeline -           
- Closed
 
-         
- 
                    JDK-8100542 Add support for drawing selected text in alternate color to Text class -           
- Closed
 
-         
             (1 relates to)