Re: Mouse Clicks

1998-11-15 Thread John Summerfield
On Sat, 14 Nov 1998, Karthik Vishwanath wrote: > Hi all, > On receiving a mousePressed, how does one determine which mouse > button is the one clicked? > > ps: i am sorry if this is a purely java based question, but then i do not > know where else i can post it. > See javap java.awt

Re: Mouse Clicks

1998-11-14 Thread Robert P. Biuk-Aghai
Just in case you want to use this to pop up a popup menu, the way NOT to do it is to check for button 3 from the mouse, as this is not portable (ever checked how many buttons a Mac mouse has?). Instead, you should check whether this is a popup mouse click, using something like this inside BOTH o

Re: Mouse Clicks

1998-11-14 Thread Chris Sommers
Karthik, Assume you have MouseEvent in a variable "event" int m = event.getModifiers(); if (m & InputEvent.BUTTON1_MASK) <- detects button 1 Take a look at InputEvents - it has a lot of static constants used for determining which button was pressed, if CTRL, ALT or SHIFT were pressed, also

Mouse Clicks

1998-11-14 Thread Karthik Vishwanath
Hi all, On receiving a mousePressed, how does one determine which mouse button is the one clicked? ps: i am sorry if this is a purely java based question, but then i do not know where else i can post it. thanks, -Karthik. +---