FileDocCategorySizeDatePackage
ObserveImage.javaAPI DocExample406Mon May 01 14:42:04 BST 2000None

ObserveImage.java

//file: ObserveImage.java
import java.awt.*;

public class ObserveImage extends java.applet.Applet {
  Image img;

  public void init(  ) {
    img = getImage( getClass(  ).getResource(getParameter("img")) );
    MyObserver mo = new MyObserver(  );
    img.getWidth( mo );
    img.getHeight( mo );
    prepareImage( img, mo );
  }

  public void paint(Graphics g) {
    g.drawImage(img, 0, 0, null);
  }
}