Example #1
0
  // start the applet
  public void start() {
    // always start with 1st image
    gContext.drawImage((Image) images.elementAt(0), 0, 0, this);

    // create a new animation thread when user visits page
    if (animate == null) {
      animate = new Thread(new Animator2Run(this, images, imageTracker, gContext));
      animate.start();
    }
  }
Example #2
0
 // display the image in the Applet's Graphics context
 public void paint(Graphics g) {
   g.drawImage(buffer, 0, 0, this);
 }