Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to detect mouse movement beyond screen border

06eefdec-2bdb-4e35-825c-b4c8cf5b0e99Jun 3 2016 — edited Jun 3 2016

I created an app that displays images. On left click (mouse down) it zooms in to 100% and you can drag the image (much larger than screen). If you release the left button the image is refitted into window again. The problem is that if the mouse cursor (made invisible while dragging) reaches the screen border the can't drag any further.
Is there any way to work around this? I see two options but don't know how to do it with java(fx):

  • detect mouse movement (not cursor movement)
  • reset the cursor position after each move step to start position

Is there a way to do this with java(fx)?

Are there any other ways? I don't want to loose the functionality on mouse down -> zoom in + drag, on mouse release refit image.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2016
Added on Jun 3 2016
0 comments
657 views