import java.awt.*; import java.applet.*; public class AppletDemo extends Applet {private int initcnt=0; private int startcnt=0; private int stopcnt=0; private int paintcnt=0; private int destroycnt=0; TextArea displaycnt=new TextArea(5,30); public void init() {initcnt++; add(displaycnt); } public void destroy() {destroycnt++;} public void start() {startcnt++; displaycnt.setText(""); displaycnt.setText("init()方法的执行次数是"+Integer.toString(initcnt)+"\n"); displaycnt.appendText("start()方法的执行次数是"+Integer.toString(startcnt)+"\n"); displaycnt.appendText("stop()方法的执行次数是"+Integer.toString(stopcnt)+"\n"); displaycnt.appendText("paint()方法的执行次数是"+Integer.toString(paintcnt)+"\n"); displaycnt.appendText("destroy()方法的执行次数是"+Integer.toString(destroycnt)+"\n"); } public void stop() {stopcnt++;} public void paint(Graphics g) {paintcnt++; g.drawLine(0,120,300,120); } }
看不懂它是搞什么的 请问谁能告诉它是怎么运行的咯 我看不懂 本人是新手 ,才上路!