FileDocCategorySizeDatePackage
AnimateFirst.javaAPI DocExample2089Thu Feb 04 16:10:34 GMT 1999None

AnimateFirst

public class AnimateFirst extends Applet

Fields Summary
int
count
int
lastcount
Image[]
pictures
TimerThread
timer
Constructors Summary
Methods Summary
public voidinit()

		lastcount = 10; count = 0;
		pictures = new Image[10];
		MediaTracker tracker = new MediaTracker(this);
		for (int a = 0; a < lastcount; a++) {
			pictures[a] = getImage (
				getCodeBase(), new Integer(a).toString()+".jpeg");
			tracker.addImage(pictures[a], 0);
		}
		tracker.checkAll(true);
	
public voidpaint(java.awt.Graphics g)

		g.drawImage(pictures[count++], 0, 0, null);

		if (count == lastcount) count = 0; 
	
public voidstart()

		timer = new TimerThread(this, 1000);
		timer.start();
	
public voidstop()

		timer.shouldRun = false;
		timer = null;