question: public void callSeriallyAndWait ( Runnable r ) { if ( isEdt ( ) ) { throw new RuntimeException ( "This method MUST NOT be invoked on the EDT" ) ; } RunnableWrapper c = new RunnableWrapper ( r , 0 ) ; callSerially ( c ) ; flushEdt ( ) ; synchronized ( lock ) { while ( ! c . isDone ( ) ) { try { lock . wait ( 50 ) ; } catch ( InterruptedException err ) { } } } }
target:  Identical to callSerially with the added benefit of waiting for the Runnable method to complete.