how to recognize between the right and left click of the mouse button??? if any one knows the answer please mail back immediately cc to email@example.com
posted 16 years ago
Check out the method isPopupTrigger() in MouseEvent or getModifiers() and BUTTON3_MASK or BUTTON2_MASK in InputEvent. First Example: if(e.isPopupTrigger()) // Code to display a pop-up menu or what ever you want to do. // This is more platform independent. Second Example: if((e.getModifiers() & e.BUTTON3_MASK) != 0) // Code to display a pop-up menu or what ever you want to do. // This is more platform dependant. Hope this helps
------------------ Warren Bell
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads