public class test extends Applet implements ActionListener
{
public void init()
{
setSize(200,200);
setLayout(null);
Button b = new Button("Click"
b.setBounds(new Rectangle(10,10,50,20));
b.addActionListener(this);
add(b, null);
}
public void actionPerformed(ActionEvent e)
{
test2 t = new test2();
t.setBounds(new Rectangle(10,110,190,90));
t.init();
add(t,null);
}
}
class test2 extends Applet
{
public void init()
{
setSize(100,100);
setLayout(null);
Button b = new Button("Click2"
b.setBounds(new Rectangle(0,10,50,20));
add(b, null);
}
} If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
public class test extends Applet implements ActionListener
{
public void init()
{
setSize(200,200);
setLayout(null);
Button b = new Button("Click"
b.setBounds(new Rectangle(10,10,50,20));
b.addActionListener(this);
add(b, null);
}
public void actionPerformed(ActionEvent e)
{
test2 t = new test2();
t.setBounds(new Rectangle(10,110,190,90));
t.init();
add(t,null);
}
}
class test2 extends Applet
{
public void init()
{
setSize(100,100);
setLayout(null);
Button b = new Button("Click2"
b.setBounds(new Rectangle(0,10,50,20));
add(b, null);
}
}
Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.