Here you can find the source of drawSquarePoint(Graphics2D g2, Point2D.Double pt, int ptSize, Color color)
public static void drawSquarePoint(Graphics2D g2, Point2D.Double pt, int ptSize, Color color)
//package com.java2s; //License from project: Apache License import java.awt.*; import java.awt.geom.*; public class Main { public static void drawSquarePoint(Graphics2D g2, Point2D.Double pt, int ptSize, Color color) { Color origColor = g2.getColor(); g2.setColor(color);/*from ww w. j av a2 s . co m*/ Rectangle2D.Double ptRect = new Rectangle2D.Double(pt.x - 4 * ptSize, pt.y - 4 * ptSize, 8 * ptSize, 8 * ptSize); g2.fill(ptRect); g2.draw(ptRect); g2.setColor(origColor); } }