I am creating a custom cursor using the following code:
1 2 3 4 5 6 7 8 9
| public void fillCursor() { cursorImages = new Image[1]; cursorImages[0] = Toolkit.getDefaultToolkit().getImage("bin/gui/cursor.gif"); } public static void setCursor(int state) { canvas.setCursor(canvas.getToolkit().createCustomCursor(cursorImages[state], new Point(0,0), "Cursor")); } |
It does indeed change my cursor, but I'm having a very strange problem, the color of my image is messed up. I have made sure that the canvas itself draws the image correctly, so I'm not really sure what's wrong. Any ideas?