A
AJ
Background: I have a JToggleButton. when I select this togglebutton,
I want to lock the cursor in this button. I have done that by using a
combination of mouseListener events (mouseExit, etc) and by warping
the mouse cursor with the Robot class.
Goal: To create a JToggleButton, that when selected, will detect
whether the mouse is moving up or down, and do something accordingly.
Problem: Problem is, I have a mouseExit handler, that when activated,
warps the cursor back to the middle of the JToggleButton.
Unfortunately, this movement is also activating my mouseListener,
making my goal above difficult.
Question: Can I unregister mouseListeners for Robots? Or can I fake
it somehow?
I want to lock the cursor in this button. I have done that by using a
combination of mouseListener events (mouseExit, etc) and by warping
the mouse cursor with the Robot class.
Goal: To create a JToggleButton, that when selected, will detect
whether the mouse is moving up or down, and do something accordingly.
Problem: Problem is, I have a mouseExit handler, that when activated,
warps the cursor back to the middle of the JToggleButton.
Unfortunately, this movement is also activating my mouseListener,
making my goal above difficult.
Question: Can I unregister mouseListeners for Robots? Or can I fake
it somehow?