Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

control mouse pointer movement  RSS feed

Amit Agarwal
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have made a cad application using swings. it includes the feature of snap-to-grid. the application uses a custom mouse cursor over a JPanel which is the drawing surface. i have used the Robot class to restrict the mouse movement to the grid points. but, the cursor vibrates a lot on movement. i feel this is because when the user moves the mouse the system first displays the cursor at the new position and then the robot class moves it to a grid point. what can be an alternate for this problem? please suggest.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!