The Polygon Class
The java.awt.Polygon class is used to represent arbitrary polygons: Polygon p = new Polygon(); p.addPoint( 50, 25 ); p.addPoint( 75, 100 ); p.addPoint( 25, 100 );
The above triangle is drawn like this: g.drawPolygon( p );
Previous slide
Next slide
Back to first slide
View graphic version