FileDocCategorySizeDatePackage
Foo.javaAPI DocExample804Tue Dec 02 02:48:56 GMT 1997None

Foo.java

import java.awt.*;
import java.awt.event.*;

public class Foo extends java.applet.Applet { 
	Image bg, image;
	public void init() {
		bg = getImage( getDocumentBase(), getParameter("bg") );
		prepareImage(bg, this);
		image = getImage( getDocumentBase(), getParameter("image") );

		PictureButton pictureButton = new PictureButton( image );
		add ( pictureButton );
		pictureButton = new PictureButton( image );
		pictureButton.pressed = true;
		add ( pictureButton );
	}
	public void paint( Graphics g ) {
		int width = bg.getWidth(null), height =  bg.getHeight(null);
		g.drawImage( bg, 0, 0, width, height, this );
		g.drawImage( bg, width, 0, width, height, this );
		g.drawImage( bg, 0, height, width, height, this );
		g.drawImage( bg, width, height, width, height, this );
		super.paint(g);
	}
}