List of usage examples for java.awt Component setLocation
public void setLocation(Point p)
From source file:org.openmicroscopy.shoola.util.ui.UIUtilities.java
/** * Shows the specified window on the screen, It will appear at the specified * location. If the location is <code>null</code>, it will appear in the * middle of the screen. // w w w.j av a2s . c o m * * @param window The component to show. * @param location The location of the specified component if * <code>null</code> it will appear in the middle of the * screen. */ public static void showOnScreen(Component window, Point location) { if (window == null) return; if (location == null) centerOnScreen(window); else { window.setLocation(location); window.setVisible(true); } }