How-To's > How do I use CSS to style my UI?
You can use CSS to style your UI in JavaFX applications. CSS stylesheets are linked by using the stylesheets variable in the javafx.scene.Scene class.
Examples
- Fun with CSS
Shows how to use CSS to dynamically style your UI at runtime. - Sudoku with CSS
All of the UI components in this sample, including the buttons, are formatted with CSS. One button enables the user to toggle between two different color themes. In this sample, the buttons are created by extending thecustomNodeclass, not by using the built-in UI controls.
API Documentation
- stylesheets variable in
javafx.scene.Scene
Last Updated: November 2009
[Return to How-To's Home]
Do you have comments about this article? We welcome your participation in our community. Please keep your comments civil and on point. You may optionally provide your email address to be notified of repliesyour information is not used for any other purpose. By submitting a comment, you agree to these Terms of Use.