if (label.getWidth() > widest) widest = label.getWidth();
pref = label.getPreferredSize(); if (pref != null && pref.width > widest) widest = pref.width;
  protected int getWidthOfWidestLabel()  {    int widest = 0;    Component label;    if (slider.getLabelTable() == null)      return 0;    for (Enumeration list = slider.getLabelTable().elements();         list.hasMoreElements();)      {	Object comp = list.nextElement();	if (! (comp instanceof Component))	  continue;	label = (Component) comp;	if (label.getWidth() > widest)	  widest = label.getWidth();      }    return widest;  }