setCursor

fun setCursor(image: Image, hotspotX: Int, hotspotY: Int)(source)

Replaces the cursor with image while it is over the window, with the pixel at column hotspotX and row hotspotY of the image marking the point that clicks land on. The cursor keeps its own copy of the pixels, so later changes to image do not reach it.

The image replaces the one from an earlier call, which is freed. resetCursor goes back to the system arrow, and close does so too. cursor still decides whether it is drawn. Like cursor, the image is shared by every window of the process.

Throws

if the hotspot is outside the image.

if the platform cannot make a cursor from the image.