Recommended reading: Action Listeners - Tutorials - Static Void Games
Type: Posts; User: KevinWorkman
Recommended reading: Action Listeners - Tutorials - Static Void Games
Where do you have your ClickListener class defined?
It looks like you're trying to use it in your main method, so ClickListener must either be in its own file or be a static inner class.
Looks like you're trying to add an ActionListener to an array. You can't do that. Instead, loop through each JButton in the array and add the ActionListener to them.