IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes catching mouse right click event Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "catching mouse right click event" Watch "catching mouse right click event" New topic
Author

catching mouse right click event

lavanya subramanian
Ranch Hand

Joined: Nov 03, 2000
Posts: 52
hi guys,
could anybody help me how to catch the mouse right click event

thanks in advance,
lavanya
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
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

Joined: Nov 03, 2000
Posts: 52
hi Roy,
Thanks,it's working
lavanya
 
 
subject: catching mouse right click event
 
Threads others viewed
How to effectivly Produce a Menu with Popup Options
On Mouse click event
Is it RightClick ?
onreadystatechange for div tag
Help me ,immediately !!!!
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture