}
  protected Dimension getDisplaySize()  {    ComboBoxModel model = comboBox.getModel();    int numItems = model.getSize();    // if combo box doesn't have any items then simply    // return its default size    if (numItems == 0)      {	displaySize = getDefaultSize();	return displaySize;      }    Dimension size = new Dimension(0, 0);    // ComboBox's display size should be equal to the     // size of the largest item in the combo box.     ListCellRenderer renderer = comboBox.getRenderer();    // FIXME: use the JComboBox.getPrototypeDisplayValue() if there is    // one    for (int i = 0; i < numItems; i++)      {        Object item = model.getElementAt(i);        String s = item.toString();        Component comp = renderer.getListCellRendererComponent(listBox, item,            -1, false, false);        Dimension compSize = comp.getPreferredSize();        if (compSize.width > size.width)          size.width = compSize.width;        if (compSize.height > size.height)          size.height = compSize.height;      }    displaySize = size;    return displaySize;  }