< All Java topicsJava (1)

Cursors

Cursors n stuff

Java:

Mouse cursors in Java.

Hide cursor

Last updated at 01:29 AM on Saturday 10th May, 2008 by Administrator


import java.awt.Image;
import java.awt.image.MemoryImageSource;

...

int[] pixels = new int[16 * 16];
Image image = tk.createImage(new MemoryImageSource(16, 16, pixels, 0, 16));
Cursor transparentCursor = tk.createCustomCursor(image, new Point(0, 0), "invisiblecursor");
setCursor(transparentCursor);

Comments (0)