8253905: Update sanity test suite to not place windows at (0,0)

Reviewed-by: shurailine, serb
This commit is contained in:
amresh-sahu 2020-11-10 05:27:16 +00:00 committed by Alexandre Iline
parent f71f9dc93a
commit 8066b33c40
4 changed files with 4 additions and 0 deletions

View File

@ -154,6 +154,7 @@ public class DialogDemo extends JPanel {
frame.add(demo);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
demo.start();
}

View File

@ -264,6 +264,7 @@ FrameDemo demo = new FrameDemo();
frame.add(demo);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
demo.start();
}

View File

@ -615,6 +615,7 @@ public class TableDemo extends JPanel {
TableDemo demo = new TableDemo();
frame.add(demo);
frame.setSize(700, 400);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
demo.start();
}

View File

@ -152,6 +152,7 @@ public final class WindowDemo extends JPanel {
WindowDemo demo = new WindowDemo();
frame.add(demo);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
demo.start();
});