title: Drawing Concentric Circles, appearing one at a time, Java
body: <p>I'm trying to draw concentric circles that appear one at a time, from smallest to largest outward. I'm wanting to give an illusion of the circle expanding, by adding an additional circle to the outside of the existing outer circle each time the loop executes. At the moment all the circles appear at the same time when I run my program. Please help, I have no idea how to do this. Thanks in advance.</p>
  
  <pre><code>public static void drawCircles(Graphics g) {
      int radius = 10;
      int x = 0;
      while(x &lt;= 10) {
          int z = radius / 2;
          g.drawOval(100 - z, 100 - z, radius, radius);
            x++;
            radius = radius + 10;
  
      }
  }
  </code></pre>