doLayout();
setSize(getPreferredSize());
  public void pack()  {    try      {	if (isIcon())	  setIcon(false);	else if (isMaximum())	  setMaximum(false);      }    catch (PropertyVetoException e)      {	// Do nothing if they don't want to be restored first.      }    doLayout();  }