How to draw star in java swing using fillPolygon
<p>I'm having trouble setting the coordinate of the star are there any better solution for this. I cannot get the the correct shape. Can someone help me on this?</p>

<pre><code>  public void star(Graphics shapes)
{
    shapes.setColor(color);
    int[] x  = {42,52,72,52,60,40,15,28,9,32,42};
    int [] y = {38,62,68,80,105,85,102,75,58,20,38};
    shapes.fillPolygon(x, y, 5);
}
</code></pre>