1  /*
  2   *  File:  RoundRectTest2.java
  3   *
  4   *  Draw some rectangles with rounded corners
  5   *
  6   *  Copyright:  Northeast Parallel Architectures Center
  7   *  
  8   */
  9  
 10  import java.applet.Applet;
 11  import java.awt.Graphics;
 12  
 13  public class RoundRectTest2 extends Applet {
 14  
 15     public void paint( Graphics g ) {
 16     
 17        // draw a rounded rectangle at ( 10, 35 ):
 18        g.drawRoundRect( 10, 35, 50, 50, 10, 20 );
 19  
 20        // draw a filled, rounded rectangle at ( 80, 15 ):
 21        g.fillRoundRect( 80, 15, 60, 80, 50, 10 );
 22  
 23        // draw a rounded rectangle at ( 150, 55 ):
 24        g.drawRoundRect( 150, 55, 80, 20, 10, 10 );
 25  
 26        // draw a filled, rounded square at ( 240, 15 ):
 27        g.fillRoundRect( 240, 15, 80, 80, 30, 30 );
 28  
 29        // draw a circle at ( 330, 15 ):
 30        g.drawRoundRect( 330, 15, 80, 80, 80, 80 );
 31            
 32     }
 33     
 34  }