This content has been marked as final. Show 3 replies
But in my real application we don't want the button can get the focus.Can the focus go to another component?
In your example the combobox just doesn't know when editing is finished. You can see this when first hitting <Return> before clicking [OK]. <Return> or focusLost tell the combo that editing is finished.
So if there is no other component to get the focus after the combo, the focus sticks in the combo and only pressing <Return> terminates the current edit.
Maybe it is of use to you, to attach an action listener to the combo which will fire on pressing <Return>.
(Untested)1 person found this helpful
Thanks db, that was were I am looking for.