I'm still a newbie but consider this...
Change your cursor image to be 16x16 that way the center point can be a whole number.
The following code determines where the mouse pointer is, so instead of (0,0) use (8,8), that way the center of the image will act as the pointer.
1
| Point cursorHotSpot = new Point(0,0); |
Another way of solving this is by setting the cursor invisible and just drawing a fake cursor over it.
1 2 3 4
| Toolkit t = Toolkit.getDefaultToolkit(); Image i = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB); Cursor noCursor = t.createCustomCursor(i, new Point(0, 0), "none"); setCursor(noCursor); |
1
| g.drawImage(imageManager.getMouseImage(), null, mouseX, mouseY); |
For you that last bit of code would be mouseX - 8, mouseY - 8 so you utilize the center of your image.
Edit: Perhaps this topic would also be better in the Newbie & Debugging Questions section.
Oh and welcome to the forums

.