• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem with "abstract class

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 80244
426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read this; it's "thank you" not "ty" please.
 
Men call me Jim. Women look past me to this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic