Login  Register

Re: open window at a specific location

Posted by William O'Connell on Mar 20, 2006; 4:35pm
URL: http://imagej.273.s1.nabble.com/open-window-at-a-specific-location-tp3703366p3703367.html

 -------------- Original message ----------------------
From: Nikos Katsikanis <[hidden email]>
> When you open and show it on screen, is there a way to open the window at a
> specific location instead of the defult location that imageJ opens it

...
// Center the windows
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    int x = (screenSize.width - DISPLAYSIZE) / 2;
    int y = DISPLAYSIZE;
    testImage.show();
    testImage.getWindow().setLocation(x, y);