A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
button "Enter" key
Joined: Feb 13, 2004
Jan 10, 2005 23:08:00
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...?
Joined: Dec 17, 2004
Jan 11, 2005 05:12:00
in key listener use,it will call the actionPerformed method
All The Best
Joined: Jan 11, 2005
Jan 11, 2005 07:39:00
you could also do
so that the user doesn't even have to tab to the ok button . He just has to hit enter.
I agree. Here's the link:
subject: button "Enter" key
Dialog Input Question
How to submit multiple records in one trip
enabling push button with key listener
A KeyListener problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014