Here you can find the source of edtSmartInvokeAndWait(Runnable block)
public static void edtSmartInvokeAndWait(Runnable block)
//package com.java2s; // Copyright 2011-2012 Paulo Augusto Peccin. See licence.txt distributed with this file. import java.lang.reflect.InvocationTargetException; import javax.swing.SwingUtilities; public class Main { public static void edtSmartInvokeAndWait(Runnable block) { if (!SwingUtilities.isEventDispatchThread()) try { SwingUtilities.invokeAndWait(block); } catch (InterruptedException e) { } catch (InvocationTargetException e) { }/* w ww. ja v a 2 s.c o m*/ else block.run(); } }