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