import java.awt.*; import java.applet.*; import java.awt.image.*; public class DelayedImageView extends Applet { private Image picture; public void init() { this.picture = this.getImage(this.getDocumentBase(), "cup.gif"); } public void paint(Graphics g) { if(!g.drawImage(this.picture, 0, 0, this)) { g.drawString("Loading Picture. Please hang on", 25, 50); } } public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) { if ((infoflags & ImageObserver.ALLBITS) == ImageObserver.ALLBITS) { this.repaint(); return false; } else { return true; } } }