File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Action Listeners Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Action Listeners" Watch "Action Listeners" New topic

Action Listeners

Jacob Coddaire
Ranch Hand

Joined: Jan 11, 2011
Posts: 36

I have a GUI in one class that makes a custom JDialog box come up. However, that JDialog box is in another class. Can I make two action listeners (1 per class) and have them both work?

For example, it would be something like

in the first class. It would call the action listener of the second class, the JDialog.

If not, then how would I solve this issue?
Greg Brannon

Joined: Oct 24, 2010
Posts: 563
Show us what you've tried so far and describe what's not working.

Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46412
But if it's a GUI, we usually discuss them elsewhere, so I shall move this discussion.
I agree. Here's the link:
subject: Action Listeners
jQuery in Action, 3rd edition