Here you can find the source of drawArc(Point2D start, double distance, double startAngle, double arcAngle, boolean fill, Graphics2D g2, Color color)
public static void drawArc(Point2D start, double distance, double startAngle, double arcAngle, boolean fill, Graphics2D g2, Color color)
//package com.java2s; import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.Point2D; public class Main { public static void drawArc(Point2D start, double distance, double startAngle, double arcAngle, boolean fill, Graphics2D g2, Color color) { int r2 = (int) (distance * 2); int x = (int) (start.getX() - distance); int y = (int) (start.getY() - distance); g2.setColor(color);//from w w w .j a v a 2 s.c o m if (fill) g2.fillArc(x, y, r2, r2, (int) Math.toDegrees(startAngle), (int) Math.toDegrees(arcAngle)); else g2.drawArc(x, y, r2, r2, (int) Math.toDegrees(startAngle), (int) Math.toDegrees(arcAngle)); } }