Board index » jbuilder » Change TAB key to ENTER

Change TAB key to ENTER


2003-09-11 04:13:17 AM
jbuilder8
Hi,
How can I allow users to change from a JTextField to another by using the
ENTER key ? I know that I have to use a KeyListener. I donīt know how to
evaluate if the ENTER key was pressed and then call the LostFocus event.
Thanks.
--
Alexandre Boaventura
Programador - GZ sistemas
XXXX@XXXXX.COM
www.gzsistemas.com.br
 
 

Re:Change TAB key to ENTER

"Alexandre Boaventura" < XXXX@XXXXX.COM >writes:
Quote
How can I allow users to change from a JTextField to another by using the
ENTER key ?
The Enter key in a textfield will trigger an ActionEvent, just move
focus in the actionPerformed() of a listener.
 

Re:Change TAB key to ENTER

Oh ! Jesus, I thought like a VB programmer !!! Forgive me please !
Thanks.
"Tor Iver Wilhelmsen (TeamB)" < XXXX@XXXXX.COM >escreveu na mensagem
Quote
"Alexandre Boaventura" < XXXX@XXXXX.COM >writes:

>How can I allow users to change from a JTextField to another by using
the
>ENTER key ?

The Enter key in a textfield will trigger an ActionEvent, just move
focus in the actionPerformed() of a listener.
 

{smallsort}