
/*
   ShapesTwo.java
   Burton Rosenberg
   Tue Mar  17, 1998

*/

import java.applet.Applet ;
import java.awt.* ;

public class ShapesTwo
extends Applet
{

     static final int XI = 50 ;
     static final int YI = 50 ;
     static final int WIDTH = 100 ;
     static final int STEP = 8 ;
     static final int N = 4 ;
  
     public void paint(Graphics gc)
     {
          int width = WIDTH ;
          int xi = XI ;
          int yi = YI ;
 
          for ( int i=0; i<N; i++ ) {
             gc.setColor( Color.blue ) ;
             gc.fillRect( xi, yi, width, width ) ;
             xi += STEP/2 ;
             yi += STEP/2 ;
             width -= STEP ;
             gc.setColor( Color.red ) ;
             gc.fillRect( xi, yi, width, width ) ;
             xi += STEP/2 ;
             yi += STEP/2 ;
             width -= STEP ;
          }

     }

}
