question: public void mousePressed ( final MouseEvent mouseEvent ) { Point lastClickedPoint = mouseEvent . getPoint ( ) ; if ( mouseEvent . isControlDown ( ) || ( mouseEvent . getButton ( ) == MouseEvent . BUTTON3 ) ) { contextMenu . show ( frame , ( int ) lastClickedPoint . getX ( ) + MENU_X_OFFSET , ( int ) lastClickedPoint . getY ( ) + MENU_Y_OFFSET ) ; } }
target:  Responds to mouse events.