import java.applet.Applet; import java.awt.*; public class AnimationTwoThread extends Applet { //---------------------------------------------------- /** Sequence through an array of 15 images to perform * the anmimation. A seperate Thread controls each * tumbling Duke. The Applet's stop method calls a * public service of the Duke class to terminate * the thread. Override update to avoid flicker * problems. */ private static final int NUMIMAGES = 15; private static final int NUMDUKES = 2; private Image[] images; private Duke[] dukes; public void init() { dukes = new Duke[NUMDUKES]; images = new Image[ NUMIMAGES ]; for (int i=0; i