1 | Here's another way to instantiate a polygon: int xValues = { 25, 125, 125, 25 }; int yValues = { 25, 25, 75, 75 }; Polygon p = new Polygon( xValues, yValues, 4 ); |
2 | To fill this quadrilateral, type: g.fillPolygon( p ); |
3 | Note: The number of vertices is required in this version of the Polygon constructor |