This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Error while implementing ActionListener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error while implementing ActionListener" Watch "Error while implementing ActionListener" New topic

Error while implementing ActionListener

divya sharma
Ranch Hand

Joined: Jan 25, 2007
Posts: 87
I want to implement an ActionListener. But when I am running it. Error appears

D:\JavaProg\head first\chap-12\ SimpleGui1B is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener
public class SimpleGui1B implements ActionListener
1 error

Tool completed with exit code 1

My Code is:

import javax.swing.*;
import java.awt.event.*;

public class SimpleGui1B implements ActionListener
JButton button;


My java version is j2sdk1.4.2_13


Joanne Neal

Joined: Aug 05, 2005
Posts: 3742
A class that implements ActionListener has to have an actionPerformed method. See the Javadoc for details.

divya sharma
Ranch Hand

Joined: Jan 25, 2007
Posts: 87
Thanks for your help!!
Have you checked out Aspose?
subject: Error while implementing ActionListener
jQuery in Action, 3rd edition