Java noob problem

NOBEL

Member
Aug 2, 2000
51
0
0
I am learning how use the ActionListener, I created a program that allows you to switch the screen from red to blue to yellow.
After I implement the Action Events (ae) I get one error.
Can anyone explain why I am getting that error and how do I fix it.

Code is below
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
It is a general practice that you dont make the frame class in itself an acionListener.

The way I usually attach actions to things is below

It would also help if you post what exact error you are getting.