FileDocCategorySizeDatePackage
squares.javaAPI DocExample538Tue Aug 15 12:18:24 BST 2000None

squares

public class squares extends Applet

Fields Summary
Dimension
appletSize
int
xCoord
int
yCoord
final int
width
final int
height
Constructors Summary
Methods Summary
public voidpaint(java.awt.Graphics g)

		
	   
	
		appletSize = this.getSize();		// get the dimensions of this applet
		xCoord     = 0;						// start in the top left corner
		yCoord     = 0;
		g.setColor(Color.red);
		do
		{
			g.drawRect(xCoord, yCoord, width, height);
			xCoord = xCoord + width;
		} while (xCoord < appletSize.width);