/** * Sets the Location of the External Window. * * @param externalWindow ExternalWindow Object. */ private void setLocationOfExternalWindow(Window externalWindow) { Toolkit tk = Toolkit.getDefaultToolkit(); Dimension screenDimension = tk.getScreenSize(); // Get Absolute Location and Bounds, relative to Screen Rectangle containerBounds = cytoPanelContainer.getBounds(); containerBounds.setLocation(cytoPanelContainer.getLocationOnScreen()); Point p = CytoPanelUtil.getLocationOfExternalWindow( screenDimension, containerBounds, externalWindow.getSize(), compassDirection, false); externalWindow.setLocation(p); externalWindow.setVisible(true); }