Article View: borland.public.jbuilder.java.language
Article #16682Re: Problems with requestFocus
From: Jeff Rafter
Date: Thu, 21 Jan 1999 00:00
Date: Thu, 21 Jan 1999 00:00
21 lines
1188 bytes
1188 bytes
Toni,
>i can only use awt components. What can i do?
Do you mean that you want to mimic this behavior for awt components without
using new features? If so, you can override the keyDown method (which has
since been deprecated). The following is some code from a JavaBean I wrote
based on java.awt.TextField.
// keyDown() has been deprecated (1.1)
public boolean keyDown(Event e, int key) {
// Make into an "Enter Edit"
if (key == Event.ENTER) {
this.nextFocus();
return true;
}
return super.keyDown(e, key);
}
Jeff Rafter
Realsoft Development
Technical Details
Message-ID:
<787ur2$h4r1@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<786kjc$fcr10@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,c772cebc2e5bcd47 X-Google-Attributes: gidf74b3,public From: "Jeff Rafter" <jeffrafter@earthlink.net> Subject: Re: Problems with requestFocus Date: 1999/01/21 Message-ID: <787ur2$h4r1@forums.borland.com> X-Deja-AN: 435328207 References: <786kjc$fcr10@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800 Organization: Realsoft Development X-MSMail-Priority: Normal Reply-To: "Jeff Rafter" <jeffrafter@earthlink.net> Newsgroups: borland.public.jbuilder.java.language