Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Detecting right mouse button click

Fri Oct 24, 2008 8:11 pm

How can I detect if the right mouse button was clicked from a swing
components mouse click listener?



Re: Detecting right mouse button click

Fri Oct 24, 2008 8:12 pm

*You can use this while you are listening*

*public* *void* mousePressed(MouseEvent e) {
*

if* (e.getModifiers() == 4) {

//Write your code

}

}

Post a reply
  Related Posts  to : Detecting right mouse button click
 Draw Bezier Curve and selecting the points with mouse click     -  
 Draw Circles using using Polar form equations-On mouse Click     -  
 Javascript Code For Moving Images On Click Of A Button     -  
 click,double click,focus,blur and hover actions in JQuery     -  
 detecting worms in websites     -  
 Convert link and button to custom button with good style     -  
 disable right click on your web page     -  
 Hide the background image by one click     -  
 Show image when click on link     -  
 C++ code Detecting Drives when when drives are added     -  

Topic Tags

Java Events