Article View: borland.public.jbuilder.java.language
Article #17450Re: ActionListener
From: Michael Nguyen
Date: Mon, 09 Nov 1998 00:00
Date: Mon, 09 Nov 1998 00:00
28 lines
1493 bytes
1493 bytes
Greg, But neither the space bar or Enter trigger ActionListener. They only trigger keyListener. Michael, Greg Hamer wrote: > Pressing the space bar will. Enter is more general as it usually applies no > matter what control has focus (The cancel button could have focus, but > pressing enter usually counts as hitting Ok). So all the controls that dont > use enter themselves are usually listened to for enter or esc so that the > right thing can be done. > > Michael Nguyen wrote: > > > I installed an ActionListener for a awt.Button. It is invoked only when > > I > > click on the button but not when I tab to the button and press the Enter > > key. > > To handle the Enter key, I need to install keyListener. Why doesn't the > > > > key press invoke the ActionListener handler ? What other conditions > > is the ActionListner handler invoked besides mouseClick ? > > Thanks for the info. > > > > Michael,
Technical Details
Message-ID:
<36472385.B4DFCA90@home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36435E2F.1C706A60@home.com> <364372F1.2159ADF0@inprise.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,e982294cd4e77555 X-Google-Attributes: gidf74b3,public From: Michael Nguyen <michaelmn@home.com> Subject: Re: ActionListener Date: 1998/11/09 Message-ID: <36472385.B4DFCA90@home.com> X-Deja-AN: 409995294 Content-Transfer-Encoding: 7bit References: <36435E2F.1C706A60@home.com> <364372F1.2159ADF0@inprise.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language