A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
SET A BUTTON AS "DEFAULT"
RAY CARNES
Greenhorn
Joined: May 02, 2000
Posts: 11
posted
May 02, 2000 12:37:00
0
How do I make a button the "default" button - the one a user can click by pressing the Enter key?
Tom P
Ranch Hand
Joined: May 06, 2000
Posts: 88
posted
May 07, 2000 00:01:00
0
You have to catch keystrokes and look for the enter key. When the enter key is pressed, trigger the button.
RAY CARNES
Greenhorn
Joined: May 02, 2000
Posts: 11
posted
May 07, 2000 10:16:00
0
Many thanks!
I agree. Here's the link:
http://aspose.com/file-tools
subject: SET A BUTTON AS "DEFAULT"
Similar Threads
JDialog: How to set focus on second JButton?
Controlling Enter Key-Triggered Submit Behavior
how to delete multiple browse
ENTER must activate the default button when pressed on a JTable
EnterKey to switch panels
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter