private void showContextMenu(final PInputEvent event){
  JPopupMenu contextMenu=getContextMenu();
  Point2D canvasPosition=event.getCanvasPosition();
  contextMenu.show((PCanvas)event.getComponent(),(int)canvasPosition.getX(),(int)canvasPosition.getY());
}

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