J
java prob
i have window xp on my pc and i have java verson 5.0 when i compile applet
related program it dosn't show any error but when i give command for run it
display the error that Exception in thread"main" java.lang.no function declare
but the same program i type in my institute(NIIT) it will run
even it is the same prog
i do all the formalityes no typing mistake i am sandig u a prog sample
import java.awt.*;
import javax.swing.*;
public class SampleLayout extends JApplet
{
JButton b1,b2,b3,b4;
GridLayout g1;
public void main(String arg[])
{
g1=new GridLayout(2,2);
JPanel p1=new JPanel();
getContentPane().add(p1);
p1.setLayout(g1);
b1=new JButton("Button1");
b2=new JButton("Button2");
b3=new JButton("Button3");
b4=new JButton("Button4");
p1.add(b1);
p1.add(b2);
p1.add(b3);
p1.add(b4);
}
}
/*<Applet code="SampleLayout.class" height=300 width=300>
</Applet>*/
is ther any mistake pls pls pls email my mistake at
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)
please
related program it dosn't show any error but when i give command for run it
display the error that Exception in thread"main" java.lang.no function declare
but the same program i type in my institute(NIIT) it will run
even it is the same prog
i do all the formalityes no typing mistake i am sandig u a prog sample
import java.awt.*;
import javax.swing.*;
public class SampleLayout extends JApplet
{
JButton b1,b2,b3,b4;
GridLayout g1;
public void main(String arg[])
{
g1=new GridLayout(2,2);
JPanel p1=new JPanel();
getContentPane().add(p1);
p1.setLayout(g1);
b1=new JButton("Button1");
b2=new JButton("Button2");
b3=new JButton("Button3");
b4=new JButton("Button4");
p1.add(b1);
p1.add(b2);
p1.add(b3);
p1.add(b4);
}
}
/*<Applet code="SampleLayout.class" height=300 width=300>
</Applet>*/
is ther any mistake pls pls pls email my mistake at
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)
please