if (current == eq.dispatchThread) throw new Error("Can't call invokeAndWait from event dispatch thread");
	public static void invokeAndWait(Runnable runnable) throws InterruptedException, InvocationTargetException {		EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue();		Thread current = Thread.currentThread();		if (current == eq.dispatchThread)			throw new Error("Can't call invokeAndWait from event dispatch thread");		InvocationEvent ie = new InvocationEvent(eq, runnable, current, true);		synchronized (current) {			eq.postEvent(ie);			current.wait();		}		Exception exception;		if ((exception = ie.getException()) != null)			throw new InvocationTargetException(exception);	}