I want to change font color in TextField .I found -fx-background-color , -fx-border-color for changing the color of background and border but nothing f
-fx-background-color
-fx-border-color
Setting the -fx-text-fill works for me.
-fx-text-fill
See below:
if (passed) { resultInfo.setText("Passed!"); resultInfo.setStyle("-fx-text-fill: green; -fx-font-size: 16px;"); } else { resultInfo.setText("Failed!"); resultInfo.setStyle("-fx-text-fill: red; -fx-font-size: 16px;"); }