drawPolygon
public abstract void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draws a closed polygon defined by arrays of x and y coordinates. Each pair of (x, y) coordinates defines a point.
This method draws the polygon defined by nPoint line segments, where the first nPoint - 1 line segments are line segments from (xPoints[i - 1], yPoints[i - 1]) to (xPoints[i], yPoints[i]), for 1 ? i ? nPoints. The figure is automatically closed by drawing a line connecting the final point to the first point, if those points are different.
Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
So, suppose you had the following figure 
Note that its points are the following: (50,15), (200, 15), (160,75) and (10,75)
See how the specs say that the first parameter is an array of x coordinates?
This would look like [50,200,160,10]
The array of y coordinates would look like [15,15,75,75]
There are 4 points in this polygon.
Hence the method call to a graphics object g would be:
declare the arrays
int [] xValues = {50,200,160,10};
int [] yValues = {15,15,75,75};
g.drawPolygon(xValues, yValues, 4);
That should do it.
Now, there is another technique using the class Polygon, which is illustrated in the rocket code by Cliff Bainter