Re: Linux/Java 1.8 bug? Panels wandering down the screen

Posted by Rasband, Wayne (NIH/NIMH) [E] on
URL: http://imagej.273.s1.nabble.com/Linux-Java-1-8-bug-Panels-wandering-down-the-screen-tp5017975p5018014.html

> On Jan 31, 2017, at 5:09 AM, Michael Schmid <[hidden email]> wrote:
>
> Hi everyone,
>
> since I have switched to Linux and Java 1.8, each time I open ImageJ, its main panel is about 25 pixels further down on the screen as the last time.  I want it at the top, but I have to move it there each time. Same with other panels; especially for panels that I open and close rather often, they wander down the screen, which can be a nuisance.
>
> This applies to all java.AWT frames (like the ImageJ main panel, Brightness&Contrast panels, my own PlugInFrames, etc.) as well as to JFrames (the Action Bar by Jerome Mutterer is a JFrame).  It seems to me that Frame.getLocation() incorrectly returns the top-left point of the frame contents, ignoring the frame's title bar.  setLocation places the top-left corner of the title bar.
>
> Does anyone out there have a way to avoid this?

The latest ImageJ daily build (1.51j38) has a workaround for the problem on Linux where the “ImageJ” window sometimes opens lower on the screen. When ImageJ starts up it ignores the y coordinate saved in the preferences and always positions the “ImageJ” window at the top of the screen. For other windows (B&C, ROI Manager, etc.), there is an option in Edit>Options>Misc ("Save window locations”) that you can disable to prevent them from wandering down the screen as they are opened and closed. Note that the "Save window locations” option is only available on Linux systems.

-wayne

> ImageJ 1.51j16; Java 1.8.0_112 [64-bit]; Linux 4.4.0-59-generic (Ubuntu 16, Oracle Java packed with ImageJ; OpenJDK 1.8.9_121 shows the same)
>
>
> Best,
>
> Michael
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html