Simply put, I have a JavaFX Textfield that I wish to 1) change the text color on, and 2) change it back to that specified in CSS. Does anyone know how to (generally) access css colors etc. from within the JavaFX code?
AnyFxElement.setStyle(String elementCss);
For source of all the css capabilities I reccomend looking up caspian css.
To remove a style use the code:
// remove the background color on the button yourElement.setStyle(null);
To set it back to it's default style:
// set the button style back to the default class yourElement.setStyle(".yourStyle");
For source of all the css capabilities I reccomend looking up caspian css.