Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MouseEvent.getX()/getY() Returning Negative Value

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found that the MouseEvent.getX()/getY() could sometimes return negative value (-1 but very close to 0) for a mouse_moved event when I move the mouse to the top left hand corner. But isn't 0 the leftest that the mouse could move on a Component? Further mouse move should simply means the event generated to the background container, never to this component.
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My mistake. Looks like it is not mouse_moved event. Rather it is mouse_exited.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic