public void mousePressed(MouseEvent e)
        {
            super.mousePressed(e);

            if(e.isPopupTrigger())
            {  // put up your popup menu
                popupMenu.show(e.getComponent(), e.getX(), e.getY());
            }

        }

See

http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html#popup

----- Original Message -----
From: "Ayman El_Gharabawy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 6:04 AM
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