Article View: borland.public.jbuilder.java.swing
Article #7658Re: JButton and Focus Question
From: James A. Schulz
Date: Wed, 20 Dec 2000 16:09
Date: Wed, 20 Dec 2000 16:09
40 lines
1913 bytes
1913 bytes
Sonny,
I am very new at this. Can you give me a clue as to how to "implement
FocusListener"?
thanks,
James
"Sonny Soriano" <sonny_jean@pacific.net.sg> wrote in message
news:3a40b9a6_1@dnews...
> I'm not sure if this is the best solution. You can trap the focus event on
> the button ( implement FocusListener ) then make your default focus
> component grab the keyboard focus ( requestFocus() ) whenever the button
> receives it.
>
> Sonny
>
> James A. Schulz <jaschulz@wiseware.com> wrote in message
> news:91qbm2$7ug5@bornews.inprise.com...
> > What is the right way to prevent a JButton from ever receiving the
focus.
> I
> > have tried setting requestFocusEnabled to FALSE, but that doesn't work.
I
> > also tried adding the following to my code:
> >
> > myJButton.isFocusTraversable(){
> > return false;
> > }
> >
> > but that doesn't do anything either.
> >
> > I'm stuck. Can anyone help?
> >
> > James
> >
> >
>
>
Technical Details
Message-ID:
<91qlf0$7uj7@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!bornews.borland.com!not-for-mailReferences:
<91qbm2$7ug5@bornews.inprise.com> <3a40b9a6_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,d51577e542f3b18b X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2000-12-20 08:10:52 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.online.be!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!bornews.borland.com!not-for-mail From: "James A. Schulz" <jaschulz@wiseware.com> Newsgroups: borland.public.jbuilder.java.swing Subject: Re: JButton and Focus Question Date: Wed, 20 Dec 2000 10:09:40 -0600 Organization: Another Netscape Collabra Server User Lines: 42 Message-ID: <91qlf0$7uj7@bornews.inprise.com> References: <91qbm2$7ug5@bornews.inprise.com> <3a40b9a6_1@dnews> Reply-To: "James A. Schulz" <jaschulz@wiseware.com> NNTP-Posting-Host: user-33qtc0i.dialup.mindspring.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200