RFR: 8296083: javax/swing/JTree/6263446/bug6263446.java fails intermittently on a VM
Sergey Bylokhov
serb at openjdk.org
Fri Nov 11 21:36:27 UTC 2022
On Fri, 11 Nov 2022 04:01:17 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> 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.
>
> WHich platform it is shifted?
I guess on any, I have tested on windows, and now on macOS. Add these lines to the end of method, and check how the frame will jump to the center:
frame.setLocationRelativeTo(null);
frame.pack();
frame.setVisible(true);
+ robot.delay(3000);
+ frame.dispose();
+ frame.pack();
+ frame.setLocationRelativeTo(null);
+ frame.setVisible(true);
-------------
PR: https://git.openjdk.org/jdk/pull/11057
More information about the client-libs-dev
mailing list