Toolkit t = Toolkit.getDefaultToolkit();
Dimension d = t.getBestCursorSize(15, 15);
BufferedImage cursorImage = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = cursorImage.createGraphics();
int cx = d.width/2, cy = d.height/2;
g.setColor(Color.WHITE); g.drawRect(cx-7, cy-7, 14, 14);
g.setColor(Color.BLACK); g.drawRect(cx-6, cy-6, 12, 12);
g.setColor(Color.WHITE); g.drawRect(cx-2, cy-2, 4, 4);
g.setColor(Color.BLACK); g.drawRect(cx-1, cy-1, 2, 2);
if (d.width%2 == 0) {
cx += 1;