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();              //getter
void 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.93.12