Basic HTML version of Foils prepared 6 Feb 99

Foil 46 The Polygon Class

From Java Academy I:Elementary Java NPAC/ECS Java Academy -- February to April 1998 and 1999. by Nancy McCracken (foils by Tom Scavo)

The java.awt.Polygon Class
1 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 );
2 The above triangle is drawn like this: g.drawPolygon( p );

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Feb 6 1999