Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2007, 06:16 AM
Member
 
Join Date: May 2007
Posts: 1
Theman is on a distinguished road
method not abstract, does not override actionperformed method.
i am completely new to java, so this might be a very basic question.

i am trying to make this applet that a user can define red, blue and green in numbers and then the number displays as the applets background color.

but when i compile it gives this error message


E:\java\ch6\myColor.java:15: myColor is not abstract and does not override abstract method actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener
public class myColor extends Applet implements ActionListener

Last edited by Theman : 05-08-2007 at 07:02 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-08-2007, 07:13 AM
Senior Member
 
Join Date: Mar 2007
Posts: 136
goldhouse is on a distinguished road
The error is very direct. It says your class mycolor is implementing an interface ActionListener. According to the java principles " if a class implements an interface the class has to implement all the methods of the interface ,Or else the class has to be an abstract class.

Confusing ..............

To solve the error in your class add a method inside the color.
Code:
public void actionPerformed(java.awt.event.ActionEvent){ }

But this is a temporary solution. I would suggest you to do 2 things.

1) Read OOps concepts of Java

2)Use some editor for Java like Eclipse. Eclipse blog
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Method Help pringle New To Java 4 04-16-2008 02:23 PM
clone method javaplus New To Java 2 01-30-2008 10:47 AM
method calling? frejon26 New To Java 4 01-25-2008 04:38 AM
Error! "filename" is not abstract and does not override abstract method... hasani6leap New To Java 4 01-06-2008 05:59 PM
Overiding an abstract method eva New To Java 5 01-03-2008 05:29 PM


All times are GMT +3. The time now is 03:59 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org