Rogach
Rogach

Reputation: 27200

How get event when text control loses focus?

I have JavaFX 2 app, and I need to perform some actions when TextField loses focus. But I do not see any events happening on the node when it loses focus.

Is it possible to somehow listen for focus lose event on TextField?

Upvotes: 6

Views: 9451

Answers (1)

jewelsea
jewelsea

Reputation: 159416

Add a ChangeListener to the TextField's focusedProperty.

Upvotes: 12

Related Questions