From bad38a0f928589be62cabcc48df8a4651c615b3c Mon Sep 17 00:00:00 2001 From: David Alayachew Date: Mon, 18 Aug 2025 20:47:02 +0000 Subject: [PATCH] 8365643: JShell EditPad out of bounds on Windows Reviewed-by: liach, aivanov, cstein, jlahoda --- src/jdk.editpad/share/classes/jdk/editpad/EditPad.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jdk.editpad/share/classes/jdk/editpad/EditPad.java b/src/jdk.editpad/share/classes/jdk/editpad/EditPad.java index ee68f035dcf..42a6ca66cd6 100644 --- a/src/jdk.editpad/share/classes/jdk/editpad/EditPad.java +++ b/src/jdk.editpad/share/classes/jdk/editpad/EditPad.java @@ -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); }