I'm trying to get the hotspot of my custom cursor to the center of my .png image, but I can't seem to figure out how. My coding skills are quite poor at the moment, but I will try anything!
public void setCursor(String filename) {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Image cursorIcon = toolkit.getImage(filename);
Image cursorIconScaledInstance = cursorIcon.getScaledInstance(60, 60, Image.SCALE_FAST);
cursor = toolkit.createCustomCursor(cursorIconScaledInstance, new Point(30, 30), "cursor");
seedButtonPanel.setCursor(cursor);
}
Don't know if you can make a cursor that large.
Here is an example that creates a custom cursor using a BufferedImage as the Cursor image: