image
CHAPTER
9
Styling a Control
As shown in Chapter 5, you can style a control in Java code, setting different properties such as the text color of a button. If you need to style a complete application with several different controls, however, this workflow creates a lot of code. JavaFX supports CSS, though, allowing you to style a complete application or control. In this chapter, you’ll learn how to apply CSS styling in JavaFX.
Using Themes to Style an Application
The fastest way to style a complete application in JavaFX is to use a custom theme. By default, all JavaFX applications use the Modena theme to style content (which is the theme applied ...

Get Mastering JavaFX 8 Controls now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.