Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with "abstract class

 
Antony Amicone
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i'm trying to use netbeans for using the system that draw gui without writing code, i did my dialog, now i'm preparing classes but i get an error



Error desktopapplication1.TbEvent is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener TbEvent.java 16


what can i do?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15482
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your class TbEvent implements the interface ActionListener.

When you have a (non-abstract) class that implements an interface, you are required to implement all the methods in the interface. One of the methods in interface ActionListener is called actionPerformed, and it takes a java.awt.event.ActionEvent as an argument. You didn't implement that method in your class.

Add a method to class TbEvent:


 
Antony Amicone
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper Young wrote:Your class TbEvent implements the interface ActionListener.

When you have a (non-abstract) class that implements an interface, you are required to implement all the methods in the interface. One of the methods in interface ActionListener is called actionPerformed, and it takes a java.awt.event.ActionEvent as an argument. You didn't implement that method in your class.

Add a method to class TbEvent:



ty a lot
 
Campbell Ritchie
Sheriff
Pie
Posts: 50196
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this; it's "thank you" not "ty" please.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic