aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes left and right clicking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "left and right clicking" Watch "left and right clicking" New topic
Author

left and right clicking

simon keillor
Greenhorn

Joined: Jun 23, 2004
Posts: 24
I working on an application were i need to identify if a user has single or double clicked with the left or right mouse button on a JLabel. But all the is detected is a left click (single or double).



What am I missingm the isPopupTrigger() function appears not to be working.

Cheers

Simon


Simon
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Check out the note in the Method Detail section of the MouseEvent api for the isPopupTrigger method.
R.Joe
Ranch Hand

Joined: Jun 16, 2004
Posts: 31
Hello sir,
Move ur code from mouseClicked to mouseReleased,
then it works fine
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: left and right clicking