Why doesn't both my Polygons have a border when i use setStroke?
<p>I am drawing two stars using:</p>

<pre><code>public void draw(Graphics2D g2) {
    g2.drawPolygon(xCoordOfStar, yCoordOfStar, POINTS);
    g2.setStroke(new BasicStroke(5));
}
</code></pre>

<p>and:</p>

<pre><code>public void paintComponent(Graphics g)
   {  
     Graphics2D g2 = (Graphics2D) g;
     Star star1 = new Star(100,200,300);
     Star star2 = new Star(200,200,300);
     star1.draw(g2);
     star2.draw(g2);    
}
</code></pre>

<p>In the other class. </p>

<p>For some reason unknown to me, only the bigger star (<code>star2</code>) gets a thicker border, while <code>star1</code> does not get any border. What am I doing wrong?</p>