On my view I only have one editable content: Text in a TextField. The problem is that as a user one never gets rid of the focus (because there is nothing else to focus on), once the TextField is focused. I want to remove the focus from the TextField when the user presses Enter. I know how to react to the Enter key being pressed, but I don't know how to unfocus a control/TextField programmatically?
Thanks for any hint!
I admit I crossposted, but I got a reply there which I want to share here:
Call requestFocus()
on the parent, e.g. in my case the HBox containing the TextField.
Full example on https://forums.oracle.com/forums/thread.jspa?messageID=10852574
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With