115 System.out.println("Test error: wrong initial focus!");
116 return;
117 }
118
119 robot.keyPress(KeyEvent.VK_SPACE);
120 robot.delay(50);
121 robot.keyRelease(KeyEvent.VK_SPACE);
122
123 Util.waitForCondition(lock, 2000);
124 Util.waitForIdle(robot);
125 }
126 }
127
128 class TestKFM extends DefaultKeyboardFocusManager {
129 Robot robot;
130 public TestKFM(Robot robot) {
131 this.robot = robot;
132 }
133 protected synchronized void enqueueKeyEvents(long after, Component untilFocused) {
134 super.enqueueKeyEvents(after, untilFocused);
135 robot.keyPress(KeyEvent.VK_SPACE);
136 robot.delay(50);
137 robot.keyRelease(KeyEvent.VK_SPACE);
138 }
139 }
|
115 System.out.println("Test error: wrong initial focus!");
116 return;
117 }
118
119 robot.keyPress(KeyEvent.VK_SPACE);
120 robot.delay(50);
121 robot.keyRelease(KeyEvent.VK_SPACE);
122
123 Util.waitForCondition(lock, 2000);
124 Util.waitForIdle(robot);
125 }
126 }
127
128 class TestKFM extends DefaultKeyboardFocusManager {
129 Robot robot;
130 public TestKFM(Robot robot) {
131 this.robot = robot;
132 }
133 protected synchronized void enqueueKeyEvents(long after, Component untilFocused) {
134 super.enqueueKeyEvents(after, untilFocused);
135 robot.delay(1);
136 robot.keyPress(KeyEvent.VK_SPACE);
137 robot.delay(50);
138 robot.keyRelease(KeyEvent.VK_SPACE);
139 }
140 }
|