This site requires JavaScript, please enable it in your browser!
Greenfoot back
bennybunny
bennybunny wrote ...

2019/4/5

Changing Mouse Cursor

bennybunny bennybunny

2019/4/5

#
The old post on how to change the mouse cursor is out dated as
1
JPanel Panel = WorldHandler.getInstance().getWorldCanvas();
is no longer working with .getWorldCanvas() no longer existing as a method? Does anyone have a fix to this?
nccb nccb

2019/4/7

#
I'm afraid this is no longer possible. In the latest Greenfoot, the display is handled on a separate JVM to the user code, so there's no way for the user code to get a reference to the display. Out of interest, do you use this to change the mouse cursor to something else, or to turn it off because you have your own image (e.g. a target) displayed in your scenario?
bennybunny bennybunny

2019/4/8

#
I want to change it so that if I hover over a button, my mouse about become the hand icon. Is there another way to do this?
danpost danpost

2019/4/9

#
You could try something else -- like have the button change its image in some way (size, brightness or color) when the mouse hovers over it.
bennybunny bennybunny

2019/4/9

#
I can try that, thank you.
You need to login to post a reply.