Losing Focus From A JTextField
After I use my textfield I can't get a jpanel that click on back into focus for my keylistener. It works for the mouselistener but all other keystrokes keep being detected by开发者_运维百科 the textfield not the jpanel.
The panel has been setFocusable(true) and works fine until i give the textfield the keyboard focus. It's like the textfield won't release the focus.
Any suggestions?
The answer was to call requestFocus() on the panel after the text action was performed
精彩评论