1  /*
  2   *  File:  ArcTest2.java
  3   *
  4   *  Draw some filled and unfilled arcs,
  5   *  plus a large, blue pacman.
  6   *
  7   *  Copyright:  Northeast Parallel Architectures Center
  8   *  
  9   */
 10  
 11  import java.applet.Applet;
 12  import java.awt.Graphics;
 13  import java.awt.Color;
 14  
 15  public class ArcTest2 extends Applet {
 16  
 17     public void paint( Graphics g ) {
 18     
 19        // draw a half ellipse: 
 20        g.drawArc( 15, 15, 80, 60, 0, 180 );
 21  
 22        // draw a filled half ellipse:
 23        g.fillArc( 15, 80, 80, 60, 0, -180 );
 24  
 25        // draw three-quarters of a filled circle:
 26        g.fillArc( 110, 55, 60, 60, 0, 270 );
 27  
 28        // draw a quarter of a circle:
 29        g.drawArc( 110, 55, 60, 60, 0, -90 );
 30  
 31        // draw a large, blue pacman:
 32        g.setColor( Color.blue );
 33        g.fillArc( 190, 15, 80, 140, 240, 240 );
 34        
 35     }
 36     
 37  }