< prev index next >
test/java/awt/Focus/DisposedWindow/DisposeDialogNotActivateOwnerTest/DisposeDialogNotActivateOwnerTest.java
Print this page
*** 60,72 ****
this.setLayout (new BorderLayout ());
Sysout.createDialogWithInstructions(new String[]
{"This is automatic test. Simply wait until it is done."
});
! frame.setBounds(800, 50, 200, 100);
frame.add(frameButton);
! dialog.setBounds(800, 300, 200, 100);
}
public void start() {
frameButton.addFocusListener(new FocusAdapter() {
--- 60,72 ----
this.setLayout (new BorderLayout ());
Sysout.createDialogWithInstructions(new String[]
{"This is automatic test. Simply wait until it is done."
});
! frame.setBounds(0, 0, 400, 200);
frame.add(frameButton);
! dialog.setBounds(100, 50, 200, 100);
}
public void start() {
frameButton.addFocusListener(new FocusAdapter() {
*** 78,93 ****
--- 78,96 ----
frame.setVisible(true);
robot.waitForIdle();
// make sure the frame is focused
clickOn(frame);
+ robot.waitForIdle();
+ robot.delay(200);
if (!frame.isFocused()) {
throw new RuntimeException("Error: a frame didn't get initial focus.");
}
dialog.setVisible(true);
robot.waitForIdle();
+ robot.delay(200);
// make sure the dialog is focused
if (!dialog.isFocused()) {
throw new RuntimeException("Error: a dialog didn't get initial focus.");
}
*** 113,124 ****
}
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.delay(20);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
-
- robot.waitForIdle();
}
}
/****************************************************
Standard Test Machinery
--- 116,125 ----
< prev index next >