• Post Reply Bookmark Topic Watch Topic
  • New Topic

catching mouse right click event  RSS feed

 
lavanya subramanian
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
could anybody help me how to catch the mouse right click event

thanks in advance,
lavanya
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if u have the jdk 1.4 u can use the getButton() function on the MouseEvent to get which button is pressed( 1 2 or 3).
if u dont' u can use teh function isMetaDown() on the event. if it returns true then the right button was pressed, false it is the left or the the middle.
 
lavanya subramanian
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Roy,
Thanks,it's working
lavanya
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!