RFR: 8365643: JShell EditPad out of bounds on Windows
Christian Stein
cstein at openjdk.org
Mon Aug 18 07:51:11 UTC 2025
On Mon, 18 Aug 2025 04:48:26 GMT, David Alayachew <duke at openjdk.org> wrote:
> When calling the `setLocationRelativeTo()` method, a null parameter means that it centers the window in the screen. However, any subsequent resizing operations will change only the size, not the location of the window. Understandable, but now the window is no longer centered. So, changing the order of operations.
I can confirm that the current order of commands results in a screen-centered upper-left corner of the edit window:
|
--+--
|[#]
Moving the `jframe.setLocationRelativeTo(null);` after the `jframe.setSize(800, 600);` (and still before `jframe.setVisible(true);`) solves the problem.
|
-[+]-
|
-------------
Marked as reviewed by cstein (Committer).
PR Review: https://git.openjdk.org/jdk/pull/26814#pullrequestreview-3127191363
More information about the compiler-dev
mailing list