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?