Problem with implements and extends

S

su_dang

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?
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

F. Marker

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?
 
F

F. Marker

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.
Yea, I realized that about 10 minutes after I posted it. :D
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top