diff --git a/test/jdk/java/awt/Frame/DefaultFrameIconTest.java b/test/jdk/java/awt/Frame/DefaultFrameIconTest.java index 3ca3b70dbd1..f8b48c6df2c 100644 --- a/test/jdk/java/awt/Frame/DefaultFrameIconTest.java +++ b/test/jdk/java/awt/Frame/DefaultFrameIconTest.java @@ -50,21 +50,11 @@ public class DefaultFrameIconTest { .instructions(INSTRUCTIONS) .columns(45) .testUI(DefaultFrameIconTest::createAndShowUI) - .positionTestUI(DefaultFrameIconTest::positionTestWindows) + .positionTestUIRightRow() .build() .awaitAndCheck(); } - private static void positionTestWindows(List testWindows, - PassFailJFrame.InstructionUI instructionUI) { - int gap = 5; - int x = instructionUI.getLocation().x + instructionUI.getSize().width + gap; - for (Window w : testWindows) { - w.setLocation(x, instructionUI.getLocation().y); - x += w.getWidth() + gap; - } - } - private static List createAndShowUI() { Frame testFrame = new Frame("Frame DefaultFrameIconTest"); Dialog testDialog = new Dialog(testFrame, "Dialog DefaultFrameIconTest"); diff --git a/test/jdk/java/awt/Frame/MenuCrash.java b/test/jdk/java/awt/Frame/MenuCrash.java index f41408ecdad..f68dd4ad000 100644 --- a/test/jdk/java/awt/Frame/MenuCrash.java +++ b/test/jdk/java/awt/Frame/MenuCrash.java @@ -62,7 +62,7 @@ public class MenuCrash { .instructions(INSTRUCTIONS) .columns(45) .testUI(MenuCrash::createAndShowUI) - .positionTestUI(MenuCrash::positionTestWindows) + .positionTestUIRightRow() .build() .awaitAndCheck(); } @@ -81,16 +81,6 @@ public class MenuCrash { return List.of(frame1, frame2); } - private static void positionTestWindows(List testWindows, - PassFailJFrame.InstructionUI instructionUI) { - int gap = 5; - int x = instructionUI.getLocation().x + instructionUI.getSize().width + gap; - for (Window w : testWindows) { - w.setLocation(x, instructionUI.getLocation().y); - x += w.getWidth() + gap; - } - } - static class MenuFrame extends Frame { private final TextField field;