I got it figued out. In the Controls class where I am creating the button I create the ActionListener:
btnClear.addActionListener(new Listeners().new btnClearListener());
And then in my...
Type: Posts; User: Krotus
I got it figued out. In the Controls class where I am creating the button I create the ActionListener:
btnClear.addActionListener(new Listeners().new btnClearListener());
And then in my...
I have a panel that an image is displayed in via a label. Clicking btnClear clears the image from the panel by removing the label. So the action listener code for btnClear works when it's in main. So...
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...