Meaningless Drivel is fun!
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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.
I agree. Here's the link:
subject: Action firing by enter key
It's not a secret anymore!