diff --git a/test/jdk/java/awt/MenuItem/SetLabelTest.java b/test/jdk/java/awt/MenuItem/SetLabelTest.java index f8a506ed7e4..154fb0d4987 100644 --- a/test/jdk/java/awt/MenuItem/SetLabelTest.java +++ b/test/jdk/java/awt/MenuItem/SetLabelTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 @@ -120,7 +120,7 @@ public class SetLabelTest { }); frame.setMenuBar(mb); frame.setSize(300, 200); - frame.setLocation(500,500); + frame.setLocationRelativeTo(null); frame.setVisible(true); }