O'Reilly logo

JavaFX™: A Beginner’s Guide by J. F. DiMarzio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14Style Your JavaFX with CSS

Key Skills & Concepts

• Adding CSS files to your packages

• Using CSS classes

• Accessing Node properties

In this chapter you learn how to use Cascading Style Sheets (CSS) to easily change the look and feel of your JavaFX applications. If you are not fully aware of what CSS is, this very quick refresher should help.

CSS is a styling language that allows you to separate the styling elements of an object from the object itself. Although CSS was created long before JavaFX, JavaFX includes the ability to use this styling language. In fact, the JavaFX CSS is based on the W3C version 2.1 CSS standard. That means you can create all your objects—or nodes in JavaFX—without any care for their placement, look, or feel. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required