Java Simple ActionListener Questions
Posted
by Allen
on Stack Overflow
See other posts from Stack Overflow
or by Allen
Published on 2010-03-09T03:56:28Z
Indexed on
2010/03/09
4:36 UTC
Read the original article
Hit count: 266
I have a main class in a program that launches another class that handles all the GUI stuff. In the GUI, i have a button that i need to attach an ActionListener to.
The only problem is, the code to be executed needs to reside within the main class.
How can i get the ActionPerformed() method to execute in the main class when a button is clicked elsewhere?
© Stack Overflow or respective owner