"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.
精彩评论