On Thu, 10 Nov 2022 06:38:19 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> test/jdk/javax/swing/JTree/6263446/bug6263446.java line 186:
>> 
>>> 184:         frame.setAlwaysOnTop(true);
>>> 185:         frame.setLocationRelativeTo(null);
>>> 186:         frame.pack();
>> 
>> pack() after the setLocationRelativeTo() may move the frame out of the 
>> center of the screen, is it intentional?
>
> it doesn't and I have checked

Please recheck, setLocationRelativeTo() calculates the location based on the 
size of the current frame, which is wrong before the pack. I just run it and 
the frame is sifted to the right part of the screen.

-------------

PR: https://git.openjdk.org/jdk/pull/11057

Reply via email to