开发者

"Forwarding" keypresses from an applet to a JFrame

I have a JFrame which contains a JApplet. There are shortcut keys that I have configured for the JFrame that work fine when the focus is on some panel of it, but once I click into the applet, none of the shortcut keys work anymore. Is there any way that I can forward these key presses to the JFrame so that the events are s开发者_运维技巧till fired?


I resolved this problem by running applet.setFocusable(false); before adding it to the JFrame.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜