In swing is a FocusManager available to get notified if the focus changes.
FocusManager.getCurrentManager().addPropertyChangeListener (...)
Is there an analogue way in javafx to get notified if the focus in the scenegraph changes?
In swing is a FocusManager available to get notified if the focus changes.
FocusManager.getCurrentManager().addPropertyChangeListener (...)
Is there an analogue way in javafx to get notified if the focus in the scenegraph changes?
You can add a ChangeListener
to the focusOwner
property of a Scene
now:
scene.focusOwnerProperty().addChangeListener(...)
There's none yet but you can try manually looping among the focusedProperties of your target nodes