If you read the JavaDocs for MouseListener & MouseEvent you will find your
answer much more quickly than if you send an email to this list and wait for
a response.


One way to do this is use the MouseEvent object (that is an argument to your
mousePressed() ) and call getButton() on that MouseEvent object. This will
return an int that you can compare against the constants in MouseEvent
(MouseEvent.BUTTON1, MouseEvent.BUTTON2, etc) to determine which button has
changed state.

> -----Original Message-----
> From: Discussion list for Java 2D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ayman El_Gharabawy
> Sent: Monday, November 25, 2002 4:04 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA2D] How to make right click Action
>
>
> i want to make action using right click or press.how can in
> mousePressed() recognize the right mouse button?
> waiting fo reply ..
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff JAVA2D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to