title: 100 Random Circles
body: <p>After I compiled the previous code it worked but now I cant get the circumference of the circles to change to a different color of whats inside the circle. Any suggestions.</p>
  
  <pre><code>    public void paintComponent(Graphics g) 
      {
          super.paintComponent(g);
          Dimension d = getSize();
          for(int i = 0; i &lt; 100; ++i) 
          {                        
              Color color = new Color(generator.nextInt(255), generator.nextInt(255), generator.nextInt(255));
              g.setColor(color);
  
              int circleSize = generator.nextInt(d.width / 4);
              int x = generator.nextInt(d.width - circleSize);
              int y = generator.nextInt(d.height - circleSize);
              g.fillOval(x, y, circleSize, circleSize);
  
              color = new Color(generator.nextInt(255), generator.nextInt(255), generator.nextInt(255));
              g.setColor(color);              
              g.drawArc(x, y, circleSize, circleSize, 0, 360);
          }
  
      }
  }
  </code></pre>