V
VisionSet
Madhur Ahuja said:Hello
What's wrong in this program:
error :
E:\programs\java1\SimpleSwing.java:23: cannot resolve symbol
symbol : constructor MyFrame (int,int)
location: class MyFrame
MyFrame mf=new MyFrame(100,100); ^
class MyFrame extends JFrame
{
public void MyFrame()
{
this.setSize(100,100);
}
public void MyFrame(int h,int w)
{
setSize(w,h);
}
}
Remove void from your 'constructors' the compiler thinks they are methods.
And therefore can only see the implicit no argument constructor of JFrame.
public MyFrame(int x, int y)