Here you can find the source of paintOval(int x, int y, Color c, int size, Graphics g)
public static void paintOval(int x, int y, Color c, int size, Graphics g)
//package com.java2s; //License from project: Open Source License import java.awt.*; public class Main { public static void paintOval(int x, int y, Color c, int size, Graphics g) { g.setColor(c);/*from ww w . j ava2 s . c o m*/ Point pos = getMapPos(x, y); g.fillOval(pos.x - (size / 2), pos.y - (size / 2), size, size); } public static Point getMapPos(int x, int y) { return new Point(-y, x); } }