This means the interface you are implementing ("ActionListener") defines more methods than what you have implemented.
Any class that implements an interface has to provide implementations of every method in the interface, or it's not "complete". You could acknowledge to the compiler that you know the class is incomplete, by declaring your class to be "abstract". But then, you still couldn't instantiate one of your Listeners until you created a subclass of that, that defined the remaining methods from the AbstractListener interface.
So, the compiler is saying, you had two options to make this thing compile:
define your class as abstract, admitting you left it incomplete, or
finish the job and provide implementations for everything left out of AbstractListener
By leaving off the "abstract" declaration from your class, you are asserting it is complete. The compiler doesn't agree....
Hope this helps. -- Jon [ January 23, 2006: Message edited by: Jon Egan ]
Joined: Dec 06, 2001
Originally posted by james oberon: says lab not abstract and does not override abstract method in line number 4
This still doesn't look like the exact error message. For instance, you don't state what abstract method the compiler says you are supposed to override. If you can, you should copy and paste the whole error message here so you don't lose important details like this. If not, then you should type it WORD FOR WORD.
With that said, I don't understand why it would give you this error message. The Lab35B class implements ActionListener and you have overriden the actionPeformed() method correctly from what I can tell. I think this should compile just fine. Of course, as I said before, we are missing some details from your error message that would help us figure out the problem. Please post the FULL error message so we can help you further.