I would like to dynamically change the color of the text in the tab label of a TabPane.
In SceneBuilder I've given the tab a name of randomTab.
In my code, I have the following:
if (randomEnabled)
randomTab.setStyle("-fx-color:Green;");
else
randomTab.setStyle("-fx-color:Black;");
However, this doesn't change the color of the text, it changes the color of the background of the tab's label.
I've tried "-fx-text-fill:Green" instead, as well as "-fx-foreground-color:Green", but neither of those have any effect.
