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 the customNode class, not by using the built-in UI controls.

API Documentation

Last Updated: November 2009
[Return to How-To's Home]



Rate This Article
Leave a Comment or Suggest a Topic

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 replies—your information is not used for any other purpose. By submitting a comment, you agree to these Terms of Use.

 

English
日本語
한국어
简体中文
русский
Português do Brasil