Here you can find the source of drawCenterCircle(Graphics2D g, Point p, int radius)
Parameter | Description |
---|---|
g | Graphics object |
p | Midpoint of the circle |
radius | radius of the circle |
public static void drawCenterCircle(Graphics2D g, Point p, int radius)
//package com.java2s; //License from project: Open Source License import java.awt.Graphics2D; import java.awt.Point; public class Main { /**/* www . ja va2 s . c om*/ * Draws a circle arround the given midpoint and radius * * @param g * Graphics object * @param p * Midpoint of the circle * @param radius * radius of the circle */ public static void drawCenterCircle(Graphics2D g, Point p, int radius) { g.drawOval(p.x - radius, p.y - radius, 2 * radius, 2 * radius); } }