retrun type incompatible occurs
- From: "JessyCute" <jessycute@xxxxxxxxx>
- Date: 27 Feb 2006 18:50:00 -0800
Hello, everybody.
I found the problem about the OO concept in java. I think this problem
should be found easily. Let's see my code. I create the interface class
with the method getText() then I create the inner class that inherits
from the JLabel and implements that interface.
The problems occurs because this interface and this inner class have
the same method getText() but it's different return parameter.
Please any advice except rename the method in this interface. Thank
you.
import java.io.File;
import javax.swing.JLabel;
public class TestOO {
public interface testInf{
public File getText();
}
class TestLabel extends JLabel implements testInf{
public File getText(){
return null;
}
}
public static void main(String[] args) {
new TestOO();
}
}
.
- Prev by Date: Re: Can the content of JComboBox be RightAlignment
- Next by Date: Increasing height of Tabs in JTabbedPane
- Previous by thread: jinternalpane freakiness
- Next by thread: Increasing height of Tabs in JTabbedPane
- Index(es):