开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜