Tuesday, August 7, 2012

Java Right mouse click event

This code allows an t right mouse click event. For So may we popup menu. Or other action we want.

So we can add multiple actions, such as a popup menu.


 private void EventMouseReleased(java.awt.event.MouseEvent evt) {                                            
        if (SwingUtilities.isRightMouseButton(evt)) {
            //CODE
        }
    }

I accept any comment or improvement. We're always learning.

No comments:

Post a Comment