jdk/src/share/classes/java/awt/EventQueue.java
changeset 4264 40c232605c68
parent 3972 8942e64cf57d
child 4365 4ac67034e98b
equal deleted inserted replaced
4263:db2d1f69a60e 4264:40c232605c68
  1025             new InvocationEvent(Toolkit.getDefaultToolkit(), runnable, lock,
  1025             new InvocationEvent(Toolkit.getDefaultToolkit(), runnable, lock,
  1026                                 true);
  1026                                 true);
  1027 
  1027 
  1028         synchronized (lock) {
  1028         synchronized (lock) {
  1029             Toolkit.getEventQueue().postEvent(event);
  1029             Toolkit.getEventQueue().postEvent(event);
  1030             lock.wait();
  1030             while (!event.isDispatched()) {
       
  1031                 lock.wait();
       
  1032             }
  1031         }
  1033         }
  1032 
  1034 
  1033         Throwable eventThrowable = event.getThrowable();
  1035         Throwable eventThrowable = event.getThrowable();
  1034         if (eventThrowable != null) {
  1036         if (eventThrowable != null) {
  1035             throw new InvocationTargetException(eventThrowable);
  1037             throw new InvocationTargetException(eventThrowable);