Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Problem with implements and extends

Thread view: 
F. Marker - 16 Feb 2007 15:35 GMT
I dont know if Im getting this error because of something Ive done/not
done, or if Netbeans is just being silly. In my source package, I've got
the following classes:
Test.java
TuioClient.java
TuioObject.java

I also have TuioListener.java, which is an interface. I've also got a
zipped folder with several more sources. I've got this folder in both
the source packages in netbeans, as well as under the Libraries in
netbeans.

Test is my main. These are my first few lines:

import javax.swing.*;
import java.awt.geom.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class Test extends JComponent implements TuioListener{}

NetBeans is underlining that last line, telling me that,
"Test is not abstract and does not override abstract method refresh() in
TuioListener"

What can I do about this?
su_dang@hotmail.com - 16 Feb 2007 16:06 GMT
> I dont know if Im getting this error because of something Ive done/not
> done, or if Netbeans is just being silly. In my source package, I've got
[quoted text clipped - 22 lines]
>
> What can I do about this?

>From the error, it seems like the interface TuioListener has a method
refresh() which your class Test is supposed to provide an
implmentation for it.  If you don't provide the implementation for
refresh(), you have to declare your class as abstract.
F. Marker - 16 Feb 2007 18:02 GMT
>> I dont know if Im getting this error because of something Ive done/not
>> done, or if Netbeans is just being silly. In my source package, I've got
[quoted text clipped - 27 lines]
> implmentation for it.  If you don't provide the implementation for
> refresh(), you have to declare your class as abstract.

Yea, I realized that about 10 minutes after I posted it. :D


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.