9. Binding

Binding enables you to link one value in a JavaFX application to another so that if the second value changes, the first is automatically updated and stays in step with it. You can bind a value to a script variable, an instance variable of a JavaFX class, an expression (including a block expression), the return value of a function, a sequence, or a part of a sequence. The most common uses for binding in JavaFX involve linking GUI components or the properties of a graphical node to some kind of state in an underlying model, and this is also the easiest and most direct way to demonstrate what can be done with binding. For that reason, many of the examples in this section use GUI components that we have not yet discussed in any detail. ...

Get JavaFX™ Developer’s Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.