super.setSize(null);
if (! SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { public void run() { show(); } }); }  setSize(getPreferredSize());
  public void pack()  {    super.setSize(null);  }