Applet Program in java
import java.awt.*;
import java.applet.*;
/*
<applet code="MethodDemo" width=350 height=200>
</applet>
*/
public class MethodDemo extends Applet
{
String msg;
public void init()
{
msg="init method: ";
}
public void start()
{
msg=msg+"start method: ";
}
public void stop()
{
msg=msg+"stop method: ";
}
public void destroy()
{
msg=msg+"destroy method: ";
}
public void paint(Graphics g)
{
msg=msg+"paint method: ";
g.drawString(msg,50,30);
}