This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Action firing by enter key Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Action firing by enter key" Watch "Action firing by enter key" New topic

Action firing by enter key

ujar abc

Joined: Jun 10, 2010
Posts: 3

is there any idea to make focus component(button/radiobutton/checkbox/etc) fires there respective action method in java when enter is pressed.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Invoke doClick on the components.

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Don't get me started about those stupid light bulbs.
subject: Action firing by enter key
Similar Threads
Controlling Enter Key-Triggered Submit Behavior
ActionEvent for Textfield
TextArea and ActionEvent