11. JavaFX Script Classes

In Java, classes are everywhere, but JavaFX is a much more informal language—you can write whole applications without having to create a single class of your own. Most of the examples in the first half of this book do not include a class declaration.1 However, if you are going to be creating reusable functionality, such as new controls to be used in your own or your company’s applications, you need to have a good understanding of JavaFX classes, which are the subject of this chapter.

As in Java, a JavaFX class may have state, represented by its instance variables, and operations that use/modify that state, in the form of instance functions. Although Java and JavaFX classes have much in common, there are various differences: ...

Get JavaFX™ Developer’s Guide 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.