0

In Java, I want to get the amount the mouse moved during the mouseMoved() event in the MouseMotionListener. I know the point given by the MouseEvent is where the mouse position is at that exact moment. Must I store a mouse position variable that is the previous mouse position? I would have to update it every time the mouse moved, or is there a better way?

MCMastery
  • 2,979
  • 2
  • 17
  • 42

0 Answers0