import java.awt.*;

public class GoodCircles extends CloseableFrame implements Runnable
{
    int extremity = 0;
    private Thread animator = null;

    public GoodCircles( )
    {
        animator = new Thread( this );
        animator.start( );
    }

    public void run( )    
    {
        drawCircles( );
    }

    public void drawCircles( )
    {
        for( extremity = 0; extremity < 200;  extremity++ )
        {
            repaint( );
            try
              { Thread.sleep( 25 ); }
            catch( InterruptedException e ) { }
        }
    }

    public void paint( Graphics g )
    {
        g.fillOval( extremity, extremity, 50, 50 );
    }

    public static void main( String [ ] args )
    {
        Frame f = new GoodCircles( );
        f.setSize( 300, 300 );
        f.show( );
    }
}
