if ((Thread.currentThread () instanceof EventDispatchThread) && !(this instanceof FileDialog)) return;
if (EventQueue.isDispatchThread ()) { EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue(); eq2 = new EventQueue (); eq.push (eq2); }
show(){  super.show();  if (isModal())    {      // If already shown (and blocked) just return      if (blocked)	return;      /* FIXME: Currently this thread may block forever if it called from         the event dispatch thread, so we only do this for FileDialog which         only depends on a signal which is delivered in the Gtk thread.         Remove this test when we add code to start another event         dispatch thread. */      if ((Thread.currentThread () instanceof EventDispatchThread) &&          !(this instanceof FileDialog))        return;            try         {	  blocked = true;	  wait ();	  blocked = false;        }       catch (InterruptedException e)        {	  blocked = false;	  return;        }    }  }