Java examples for 2D Graphics:Arc
Draw Arc
import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; public class Main { public void paint(Graphics g){ //this will draw an arc of width 50 & height 100 at (10,10) g.drawArc(10,10,50,100,10,45); /*/*from w w w .ja va 2 s . co m*/ * To draw a filled arc use * fillArc(int x1,int y1, int width, int height,int startAngle, int arcAngle) */ //draw filled arc g.fillArc(100,10,100,100,0,90); } }