title: Java expanding circle
body: <p>I am trying to have an applet draw a circle starting with the size of the beginning radius expanding over and over until it reaches the end size of radius. Just need a push in the right direction this is what i have so far..</p>
  
  <pre><code>import javax.swing.JApplet;
  import java.awt.Graphics;
  import java.util.Scanner;
  
  public class circleExpandv1 extends JApplet
  {
      public void paint( Graphics g )
      {
          super.paint( g ); //instantiate g with paint
  
          Scanner scan = new Scanner( System.in );
  
          System.out.print( "\nEnter beginning radius &gt; " );
          int radiusStart = scan.nextInt();  
  
          System.out.print( "\nEnter ending radius &gt; " );
          int radiusEnd = scan.nextInt();  
  
          int centerX0 = 150, centerY0 = 50; // set x y cordinates
          int radius0 = radiusStart;  // set radius                 
  
          int centerX1 = 150, centerY1 = 50; // set x y cordinates
          int radius1 = radiusEnd;  // set radius
  
          while ( radiusStart != radiusEnd )
          {
               if ( radius0 &lt; radius1 )
               {
                   g.drawOval( centerX0 - radius0, centerY0 - radius0, radius0 * 2, radius0 * 2 ); //draw oval
               }
          }
  
          //g.clearOval( centerX0 - radius0, centerY0 - radius0, radius0 * 2, radius0 * 2 ); //clear oval
  
          }
      }
  </code></pre>