import java.applet.*;
import java.awt.*;
/**/
public class A1 extends Applet
{
String s="";
public void init()
{
s+=" Init,";
}
public void start()
{
s+=" Start,";
}
public void paint(Graphics g)
{
s+=" Paint";
g.drawString(s,10,100);
}
public void stop()
{
System.out.println("Stop");
}
public void destroy()
{
System.out.println("Destroy");
}
}
It prints “Init Start Paint” in the applet and then
Stop
Destroy
On the console screen
1 comments:
Post a Comment