Re: Set keyboard focus to Applet when it is loaded
- From: Felix Natter <fnatter@xxxxxxx>
- Date: Sat, 26 Aug 2006 17:41:41 +0200
"Andrew Thompson" <andrewthommo@xxxxxxxxx> writes:
Felix Natter wrote:
...
I have an applet with a JTextArea and I would like the keyboard focus
to be in that JTextArea as soon as the applet is loaded (so that
the user can immediately start typing).
Use an HTML form <input> element for instantaneous
response, an applet needs to looad the VM, then the applet.
Currently I do two things (with no success):
1. use javascript to set the focus on the <applet> element:
<body onLoad="document.getElementById('kbapplet').focus()">
...
<applet id="kbapplet" code=".."></applet>
This JavaScript is typical of the quality of JS written
by Java programmers. It is horrid.
out of curiosity: what's wrong with this? too inefficient?
greetings,
--
Felix Natter
.
- References:
- Set keyboard focus to Applet when it is loaded
- From: Felix Natter
- Re: Set keyboard focus to Applet when it is loaded
- From: Andrew Thompson
- Set keyboard focus to Applet when it is loaded
- Prev by Date: having much space in menus before the icon
- Next by Date: Re: Set keyboard focus to Applet when it is loaded
- Previous by thread: Re: Set keyboard focus to Applet when it is loaded
- Next by thread: Re: Set keyboard focus to Applet when it is loaded
- Index(es):
Relevant Pages
|