Basic HTML version of Foils prepared 13 July 98

Foil 51 Instance Methods (cont'd)

From Java Academy II:Advanced Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo

The java.awt.Polygon Class
1 This method returns all vertices of a polygon: public Point[] getPoints() { Point[] points = new Point[ npoints ]; for ( int i = 0; i < npoints; i++ ) { points[i] = new Point( xpoints[i], ypoints[i] ); } return points; }
2 It uses certain variables of the Polygon class: xpoints[], ypoints[], and npoints

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 Nov 28 1998