8365643: JShell EditPad out of bounds on Windows

Reviewed-by: liach, aivanov, cstein, jlahoda
This commit is contained in:
David Alayachew 2025-08-18 20:47:02 +00:00 committed by Chen Liang
parent 285adff24e
commit bad38a0f92

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -89,7 +89,6 @@ class EditPad implements Runnable {
closer.run();
}
});
jframe.setLocationRelativeTo(null);
jframe.setLayout(new BorderLayout());
JTextArea textArea = new JTextArea(initialText);
textArea.setFont(new Font("monospaced", Font.PLAIN, 13));
@ -97,6 +96,7 @@ class EditPad implements Runnable {
jframe.add(buttons(closer, textArea), BorderLayout.SOUTH);
jframe.setSize(800, 600);
jframe.setLocationRelativeTo(null);
jframe.setVisible(true);
}