Working with the Property API

In addition to the regular getters and setters, JavaFX provides a Property API to almost all its classes' fields.

For example, there are the following methods to work with the Stage title: 

String getTitle();              //gettervoid setTitle(String title);    //setter StringProperty titleProperty(); //property access

Technically, getters and setters are not required, and the Property value can be used all the time. 

The Property class has the following two important APIs—Observable and Binding.

Get Mastering JavaFX 10 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.