test/java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java
Print this page
*** 74,84 ****
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent event) {
System.err.println("User closed the window");
- System.exit(1);
}
});
HierarchyBoundsListener listener = new HierarchyBoundsListenerImpl();
for (int i = 0; i < components.length; i++) {
--- 74,83 ----
*** 129,139 ****
try {
robot = new Robot();
Thread.sleep(delay * 10);
} catch (Exception e) {
e.printStackTrace();
! System.exit(1);
}
robot.mouseMove((int) components[0].getLocationOnScreen().x + components[0].getSize().width / 2,
(int) components[0].getLocationOnScreen().y + components[0].getSize().height / 2);
robot.delay(delay);
--- 128,138 ----
try {
robot = new Robot();
Thread.sleep(delay * 10);
} catch (Exception e) {
e.printStackTrace();
! throw new RuntimeException("Robot creation exception.");
}
robot.mouseMove((int) components[0].getLocationOnScreen().x + components[0].getSize().width / 2,
(int) components[0].getLocationOnScreen().y + components[0].getSize().height / 2);
robot.delay(delay);
*** 593,611 ****
private static TestDialog dialog;
public static void createDialogWithInstructions(String[] instructions) {
dialog = new TestDialog(new Frame(), "Instructions");
dialog.printInstructions(instructions);
! dialog.setVisible(true);
println("Any messages for the tester will display here.");
}
public static void createDialog() {
dialog = new TestDialog(new Frame(), "Instructions");
String[] defInstr = {"Instructions will appear here. ", ""};
dialog.printInstructions(defInstr);
! dialog.setVisible(true);
println("Any messages for the tester will display here.");
}
public static void printInstructions(String[] instructions) {
dialog.printInstructions(instructions);
--- 592,610 ----
private static TestDialog dialog;
public static void createDialogWithInstructions(String[] instructions) {
dialog = new TestDialog(new Frame(), "Instructions");
dialog.printInstructions(instructions);
! //dialog.setVisible(true);
println("Any messages for the tester will display here.");
}
public static void createDialog() {
dialog = new TestDialog(new Frame(), "Instructions");
String[] defInstr = {"Instructions will appear here. ", ""};
dialog.printInstructions(defInstr);
! //dialog.setVisible(true);
println("Any messages for the tester will display here.");
}
public static void printInstructions(String[] instructions) {
dialog.printInstructions(instructions);
*** 641,651 ****
messageText = new TextArea("", 5, maxStringLength, scrollBoth);
add("Center", messageText);
pack();
! setVisible(true);
}// TestDialog()
//DO NOT call this directly, go through Sysout
public void printInstructions(String[] instructions) {
//Clear out any current instructions
--- 640,650 ----
messageText = new TextArea("", 5, maxStringLength, scrollBoth);
add("Center", messageText);
pack();
! //setVisible(true);
}// TestDialog()
//DO NOT call this directly, go through Sysout
public void printInstructions(String[] instructions) {
//Clear out any current instructions