wood burning stoves 2.0*
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 557
Show us what you've tried so far and describe what's not working.

Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 37913
But if it's a GUI, we usually discuss them elsewhere, so I shall move this discussion.
I agree. Here's the link: http://aspose.com/file-tools
subject: Action Listeners
Similar Threads
ContainerListener not firing from a JPanel contained within a JDialog
pop up menu
Reference to the outer class
setAction and addActionListener
Having difficulty sizing a viewport to fit inside a JDialog...any suggestions?