question: private static void ensureEventDispatchThread ( ) { if ( ! EventQueue . isDispatchThread ( ) ) { throw new IllegalStateException ( "The DialogWrapper can only be used in event dispatch thread. Current thread: " + Thread . currentThread ( ) ) ; } }
target:  Ensure that dialog is used from even dispatch thread.