|
/* Animation.java
*
* A Java Applet demonstrating image animation.
*
* Authored by Khim Theng
* khim_theng@completeesolutions.com
*
* Last modified on 05/11/2000
*/
import java.applet.Applet;
import java.awt.*;
public class Animation extends Applet
{
private Image dogs[];
private int totalImages = 4, //Total number of images
currentImage = 0, //Current image subscript
sleepTime = 500; //Milliseconds to sleep
//Load the image when the applet begins executing
public void init()
{
setBackground(Color.white); //Set the background to white
dogs = new Image[totalImages]; //Create a new Image array
for (int i=0; i
|