
上QQ阅读APP看书,第一时间看更新
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.