how to use another class in java inside of an action listenrer

Solutions on MaxInterview for how to use another class in java inside of an action listenrer by the best coders in the world

showing results for - "how to use another class in java inside of an action listenrer"
Shayna
28 Aug 2017
1public class SomeActionListener implements ActionListener{
2
3    private JTextField textField1;
4    private JComboBox combo1;
5    private JTextField textField2;
6    //...
7
8    public SomeActionListener(JTextField textField1, JComboBox combo1, 
9                                          JTextField textField2){
10        this.textField1=textField1;
11        this.combo1=combo1;
12        this.textField2=textField2;
13        //...
14    }
15
16    public void actionPerformed(ActionEvent e) {
17        //cmd
18    }
19
20}
21