I could use some guidance on how to trap the ENTER key in a JTextbox....
As of now, my customers have to manually click a submit button when done entering the data...
Printable View
I could use some guidance on how to trap the ENTER key in a JTextbox....
As of now, my customers have to manually click a submit button when done entering the data...
thanks dilinger, I found some other code too on the Sun Forums...
basically a one-line statement...
Code:rootPane.setDefaultButton(button1);
See what lack of sleep will get you. :D
Well, technically, that's not catching the keypress event, but if it's what you want, there you go. :)Quote:
Originally posted by nemaroller
thanks dilinger, I found some other code too on the Sun Forums...
basically a one-line statement...
Code:rootPane.setDefaultButton(button1);
True. ;)Quote:
Originally posted by rjlohan
Well, technically, that's not catching the keypress event