This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to handle many events ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to handle many events ?" Watch "How to handle many events ?" New topic

How to handle many events ?

Eusebio Floriano
Ranch Hand

Joined: Mar 07, 2004
Posts: 237
Hi folks,

I would like to know how to handle events in forms with many controls.
For example, there is a short-cut "XXX" associated with an event and
every control should handle it.
How is the best way to handle it ? Is there any pattern for it ?


SCJP 1.4 / 5.0 - SCBCD 1.3 - SCWCD 1.4 - IBM 484
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
This might be possible using Action class (javax.swing.Action). Theres a section in the Java Tutorial on it, but the last time I checked it wasn't very complete.
Have you tried LearnNowOnline?
subject: How to handle many events ?