Skip to content
Advertisement

Tag: shift

Change the mouse cursor when shift key is pressed

I have a subclass PointPanel of JPanel, where I want to implement the following behavior: If the mouse hovers the instance and the shift key is pressed, the mouse cursor changes to the hand cursor; if the shift key is released, the mouse cursor changes back to the default cursor. In order to achieve this, I tried to add a

Advertisement