So I've broken out my JFrame controls into their own class called Controls that extends the main class.
Now I'm trying to break out the Action Listeners into a Listeners class.
This code runs inpublic static void main(String[] arguments) throws IOException {}:
Controls.btnClear.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Controls.panel.remove(Controls.label); Controls.panel.repaint(); } });
I have the Listeners class as:public class Listeners extends Controls implements ActionListener {}
The question is, how do I get that btnClear (it clears an image in a panel) to work when I move it to the Listeners class?