1  /*
  2   *  File:  RectTest.java
  3   *
  4   *  Draw a rectangle and a filled rectangle
  5   *
  6   *  Copyright:  Northeast Parallel Architectures Center
  7   *  
  8   */
  9  
 10  import java.applet.Applet;
 11  import java.awt.Graphics;
 12  
 13  public class RectTest extends Applet {
 14  
 15     public void paint( Graphics g ) {
 16     
 17        // draw a rectangle at point ( 20, 15 ):
 18        g.drawRect( 20, 15, 100, 100 );
 19  
 20        // draw a filled rectangle at point ( 140, 15 ):
 21        g.fillRect( 140, 15, 100, 100 );
 22        
 23     }
 24     
 25  }