private static void makeModal(JDialog dialog)
static void makeModal(JDialog dialog)
  private static void makeModal(JDialog dialog)  {    try      {	synchronized (dialog)	  {	    while (dialog.isVisible())	      dialog.wait();	  }      }    catch (InterruptedException e)      {      }  }