Why doesn an applet viewed through the browser respond to keyboard events, but the same works fine from within appletviewer?
Location: http://www.jguru.com/faq/view.jsp?EID=107861 Created: Jul 21, 2000 Modified: 2000-07-21 08:47:08.308 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Question originally posed by Sriram Narasimhan (http://www.jguru.com/guru/viewbio.jsp?EID=105242 In order to respond to keyboard events your applet needs to have the input focus. In the case of appletviewer, there is nothing else on the page that might have focus. In the case of a browser, there is. Just click into the applet’s area to have it get the input focus and then it will respond to keyboard events.
Related Questions
- When attempting to logon I receive the following message "The page must be viewed with a high-security web browser." What should I do?
- While downloading and executing an applet, there is no action but a gray rectangle box appears in the browser. Whats going on?
- My applet runs fine with appletviewer but not in the browser, what can be the problem?