FileDocCategorySizeDatePackage
PolygonFill.javaAPI DocExample508Sat Jun 24 20:09:48 BST 2000None

PolygonFill

public class PolygonFill extends Component
Fill a Polygon

Fields Summary
Polygon
p
The points we draw
Constructors Summary
public PolygonFill()
Construct the drawing object

		p = new Polygon();
		// make a triangle.
		p.addPoint(0,100);
		p.addPoint(200,0);
		p.addPoint(200,200);
	
Methods Summary
public java.awt.DimensiongetPreferredSize()

		return new Dimension(210, 210);
	
public voidpaint(java.awt.Graphics g)

		g.setColor(Color.black);
		g.drawPolygon(p);
		g.setColor(Color.gray);
		g.fillPolygon(p);