| Author |
button "Enter" key
|
Vijay Vaddem
Ranch Hand
Joined: Feb 13, 2004
Posts: 243
|
|
Hi All, I have a screen with couple of text fields and buttons. once the user enters the values in the text fields, "he moves on to the OK button using tab key" and presses Enter key. Once he press the enter key, the actionListener method of OK button should be invoked as if he clicked on that button. Can anyone help pls...? Vijay
|
 |
sasi kala
Ranch Hand
Joined: Dec 17, 2004
Posts: 68
|
|
Hi, in key listener use,it will call the actionPerformed method All The Best
|
 |
Mikie Williams
Greenhorn
Joined: Jan 11, 2005
Posts: 7
|
|
you could also do getRootPane().setDefaultButton(button1) so that the user doesn't even have to tab to the ok button . He just has to hit enter.
|
 |
 |
|
|
subject: button "Enter" key
|
|
|