I just wanted to find out if one can have a actionListener() in one .class file and then have the actionEvent() in another .class file? If not, how would I go about to get the same effect?
Two ways to go: 1. Define the whole ActionListener in the second class but add it in the first myBotton.addActionListener(new OtherClass.OtherActionListener()); 2. Define the ActionListener in the first class in the usual way but in the actionPerformed method just call a method in the second class Read More