The other example described in that section, MultiListener.java, has two action sources and two action listeners, with one listener listening to both sources and the other listening to just one. The Action Listener API. The ActionListener Interface. Becau
Heres what I want to do, one of the classes is for a JFrame which contains all JButtons, I want another class to listen for the actions made on the JFrame class. See the code below: public class Frame extends JFrame{ //all the jcomponents in here } public
To answer: "my problem is that action listener have many variables of swing like buttons for example,so, when i change to another class, i have problems with that" Your action listener class could have a constructor that takes a parameter of the
Post a Comment:
Showing 0 Comments: