< prev index next >

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

Print this page

        

*** 111,133 **** 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; } catch (InterruptedException e) { throw new RuntimeException(e); } catch (IllegalComponentStateException e) {} } } --- 111,130 ---- 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)); } robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); waitForIdle(); } void waitTillShown(Component c) { while (true) { try { Thread.sleep(100); ! c.getLocationOnScreen(); ! break; } catch (InterruptedException e) { throw new RuntimeException(e); } catch (IllegalComponentStateException e) {} } }
< prev index next >