Here you can find the source of drawSelectionPoint(Graphics g, Point p)
public static void drawSelectionPoint(Graphics g, Point p)
//package com.java2s; //License from project: Apache License import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.geom.Ellipse2D; public class Main { public final static BasicStroke boldStroke = new BasicStroke(1.5f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 10.0f, null, 0.0f); /** The selection color */ public static Color selectionColor = Color.RED; public static void drawSelectionPoint(Graphics g, Point p) { Graphics2D g2 = (Graphics2D) g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2.setStroke(boldStroke);//w w w. ja va 2s . c o m g2.setPaint(selectionColor); Shape s = new Ellipse2D.Double(p.x - 5, p.y - 5, 10, 10); g2.draw(s); } }