Kapitel 10: "Appletprogrammierung"

"AppletZyklus.java"


import java.awt.*;
import java.applet.*;

public class AppletZyklus extends Applet {
private int zaehler;
private String txt;

public void init(){
zaehler=0;
System.out.println("init");
}

public void start(){
txt = "start: "+zaehler;
System.out.println("start");
}

public void stop(){
zaehler++;
System.out.println("stop");
}

public void destroy(){
System.out.println("destroy");
}

public void paint(Graphics g){
g.drawString(txt, 20, 20);
}
}

Picksel Media Marco Block © 2006-2009 – ImpressumKontakt
Gestaltung und Umsetzung Tobias Losch, www.picksel-media.de