//applet life cycle
import java.applet.*;
import java.awt.*;
public class assign17 extends Applet{
private static int icall=0, call=0 ,scall=0, pcall=0,dcall=0;
public void init()
{
setBackground(Color.white);
setForeground(Color.black);
icall++;
}
public void start(){
call++;
}
public void paint(Graphics g){
pcall++;
g.drawString("init method called "+icall+" times.", 10, 10);
g.drawString("start method called "+call+" times.", 10, 30);
g.drawString("stop method called "+scall+" times.", 10, 50);
g.drawString("paint method called "+pcall+" times.", 10, 70);
g.drawString("destroy method called "+dcall+" times.", 10, 90);
}
public void stop(){
scall++;
}
public void destroy(){
dcall++;
}
}