Point newLocation = new Point(x, y); adjustOffsets(comp.getParent(), newLocation);
Point newLocation; try { newLocation = comp.getLocationOnScreen(); } catch (IllegalComponentStateException e) {     return; }   if (comp instanceof ZoomDrawingView) { double scale = ((ZoomDrawingView) comp).getScale(); x *= scale; y *= scale; } newLocation.translate(x,y);
	protected void showPopupMenu(Figure figure, int x, int y, Component comp) {		Object attribute = figure.getAttribute(popupMenuAttribute);		if ((attribute != null) && (attribute instanceof JPopupMenu)) {			JPopupMenu popup = (JPopupMenu)attribute;			if (popup instanceof PopupMenuFigureSelection) {				((PopupMenuFigureSelection)popup).setSelectedFigure(figure);			}			// calculate offsets for internal MDI frames			Point newLocation = new Point(x, y);			adjustOffsets(comp.getParent(), newLocation);			popup.setLocation(newLocation);			popup.setInvoker(comp);			popup.setVisible(true);		}	}