< prev index next >

test/jdk/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java

Print this page

        

@@ -111,23 +111,20 @@
         if (c instanceof Frame) {
             robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + ((Frame)c).getInsets().top/2);
         } else {
             robot.mouseMove(p.x + (int)(d.getWidth()/2), p.y + (int)(d.getHeight()/2));
         }
-        waitForIdle();
         robot.mousePress(InputEvent.BUTTON1_MASK);
-        robot.delay(50);
         robot.mouseRelease(InputEvent.BUTTON1_MASK);
         waitForIdle();
     }
     void waitTillShown(Component c) {
         while (true) {
             try {
                 Thread.sleep(100);
-                Point p = c.getLocationOnScreen();
-                if (p != null)
-                    break;
+                c.getLocationOnScreen();
+                break;
             } catch (InterruptedException e) {
                 throw new RuntimeException(e);
             } catch (IllegalComponentStateException e) {}
         }
     }
< prev index next >