Article View: borland.public.jbuilder.java.language
Article #16692Re: Problems with requestFocus
From: Toni Saez
Date: Fri, 22 Jan 1999 00:00
Date: Fri, 22 Jan 1999 00:00
29 lines
1387 bytes
1387 bytes
Thanks, but I donοΏ½t want to pass the focus to the next. I want to pass the
focus another control, not necesarily the next. How can i do?
Toni
Jeff Rafter wrote in message <787ur2$h4r1@forums.borland.com>...
>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:
<789c3u$ima2@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<786kjc$fcr10@forums.borland.com> <787ur2$h4r1@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,c772cebc2e5bcd47 X-Google-Attributes: gidf74b3,public From: "Toni Saez" <asaez@bilbomatica.es> Subject: Re: Problems with requestFocus Date: 1999/01/22 Message-ID: <789c3u$ima2@forums.borland.com> X-Deja-AN: 435554499 References: <786kjc$fcr10@forums.borland.com> <787ur2$h4r1@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language