FileDocCategorySizeDatePackage
Animate.javaAPI DocExample1052Mon Mar 24 02:01:00 GMT 1997None

Animate

public class Animate extends Frame

Fields Summary
static Image[]
im
static int
numImages
static int
counter
Constructors Summary
Animate()

      
        super ("Animate");
    
Methods Summary
public static voidmain(java.lang.String[] args)

        Frame f = new Animate();
        f.resize (225, 225);
        f.show();
        im = new Image[numImages];
        for (int i=0;i<numImages;i++) {
            im[i] = Toolkit.getDefaultToolkit().getImage ("clock"+i+".jpg");
        }
    
public synchronized voidpaint(java.awt.Graphics g)

        g.translate (insets().left, insets().top);
        g.drawImage (im[counter], 0, 0, this);
        counter++;
        if (counter == numImages)
            counter = 0;
        repaint (200);