Reputation: 2946
I have the following code:
primaryStage.setTitle("Hello World!");
GridPane root = new GridPane();
final Scene scene = new Scene(root);
Label logol = new Label("Test logo");
logol.setStyle("-fx-color: red;");
root.add(logol, 0, 0);
primaryStage.setScene(scene);
primaryStage.show();
all that i am trying to do is that the label logol will have red foreground color but it insisting on staying black.
what am i doing wrong?
Upvotes: 2
Views: 1104
Reputation: 49185
There is no CSS property "-fx-color". To change the foreground color use "-fx-text-fill: red" instead.
Upvotes: 3