Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse problem 1

Status
Not open for further replies.

globos

Programmer
Nov 8, 2000
260
FR
Hi,

I would like to detect when the user presses the right button of his mouse.
I tried this, but it does not work :

public void mousePressed(MouseEvent e)
{
if (e.isPopupTrigger ())
{ ... }
}


Thanks. --
Globos
 
hi

try this :

public void mousePressed(MouseEvent e) {

if( (e.getModifiers() & InputEvent.BUTTON3_MASK) != 0 ) {
....
}

} manu0
 
Thanks, it works!
You got a star! --
Globos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top