Other |
---|
fx2.0.2Fixed |
Blocks :
|
|
Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
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); } }
|