Hello, True Java Greenhorn on deck, so go easy on me. I am writing a TicTacToe program in my JAVA class. I am receiving the error "class TicTacToe must be declared abstract. It does not define public abstract void actionPerformed(ActionEvent) from class java.awt.event.ActionListener public class TicTacToe extends JFrame ^ 1 error I cannot resolve the error with the information I have available. Please help. Thanks! Susan W.
Bosun Bello
Ranch Hand
Joined: Nov 06, 2000
Posts: 1506
posted
0
According to the massage, it sounds like you are implementing an interface but you are not providing implementation for all the methods in the interface. The action listener interface has only one method "actionPerformed" it's abstract and you must provide it's implementation or declare your class as abstract.
Bosun
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
posted
0
Hi Susan, It's simple. If you tell Java that your class will implement any interface (in this case ActionListener) you are required to at least put a stub of the interface method in your class or declare your class abstract. 1. Place the following method into your class.
or 2. Make your class abstract. Like the following.
Regards, Manfred
Susan Worthington
Greenhorn
Joined: Apr 19, 2001
Posts: 2
posted
0
Thanks for the quick response. I'll implement your recommendations, and see if it resovles the issue. I'll keep you updated. Susan W.