question: private void showContextMenu ( final PInputEvent event ) { JPopupMenu contextMenu = getContextMenu ( ) ; Point2D canvasPosition = event . getCanvasPosition ( ) ; contextMenu . show ( ( PCanvas ) event . getComponent ( ) , ( int ) canvasPosition . getX ( ) , ( int ) canvasPosition . getY ( ) ) ; }
target:  Show the context menu.