Re: applet & swing
- From: "Rhino" <no.offline.contact.please@xxxxxxxxxx>
- Date: Tue, 7 Feb 2006 19:48:22 -0500
"Michael" <mbialowas@xxxxxxx> wrote in message
news:oSaGf.355791$tl.139128@xxxxxxxxxxx
Hello all, I had a quick question. Is it possible to put the cursor on aI haven't messed with focus in an applet in quite a while so my memory is
JTextField as soon as an applet loads? I made an applet that does not
place the cursor in the name JTextField when the applet first loads. The
only way it loads is if I enter in data and press submit; then the cursor
goes inside this textfield upon entering another student. I have tried the
following;
nameText.requestFocus();
thanks in advance.
foggy on this point. However, I *think* the old requestFocus() and related
methods are deprecated and have been since Java 1.3 or thereabouts. Sun came
up with a more bulletproof focus traversal scheme at that point. The new
scheme was explained in the appropriate docs (the ones that come with the
API but aren't _in_ the API, if you know what I mean) but it was a pretty
dense and convoluted document as I recall; luckily, I haven't had any focus
issues in quite a while so I never really had to digest that document.
But it should still be around somewhere; it might even still be present in
the 1.5 API, although I haven't looked. See if you can find it in the 1.5
API; if it's not there, try searching on "focus" at the Sun site
(http://java.sun.com) and you're bound to find it eventually.
Or maybe someone here can point you to a more straightforward discussion of
focus under the new scheme.
--
Rhino
.
- References:
- applet & swing
- From: Michael
- applet & swing
- Prev by Date: applet & swing
- Next by Date: Re: applet & swing
- Previous by thread: applet & swing
- Next by thread: Re: applet & swing
- Index(es):
Relevant Pages
|
|