Java tutorial
import java.awt.Graphics; import javax.swing.JApplet; public class MainClass extends JApplet { String str = ""; public void init() { str += "init; "; } public void start() { str += "start; "; } public void stop() { str += "stop; "; } public void destroy() { System.out.println("destroy"); } public void paint(Graphics g) { g.drawString(str, 10, 25); } }