Meaningless Drivel is fun!
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
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.
I agree. Here's the link:
subject: How to handle many events ?
It's not a secret anymore!