Hey everyone,
This is a method that I wrote to open an image as a mouse cursor.
/**
Set the image the mouse cursor uses. If imageName is null then
the cursor is invisible.
*/
public void setCursorImage(String imageName, Window win){
Cursor cursor =
Toolkit.getDefaultToolkit().createCustomCursor(Toolkit.getDefaultToolkit().getImage(imageName),
new Point(0, 0), "CURSOR");
window.setCursor(cursor);
}
I hope that this helps! Have fun.
-Tim
|