The role of listeners

Note that binding is not a complete replacement for listeners. EventListener objects are still required to program a reaction to the user actions or system events. Binding plays its role, then you need to update one entity based on the state of another.

So, the rule of thumb is, if you are writing ChangeListener or InvalidationListener, consider using binding instead.

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.