list.add(object); fireIntervalAdded(this, list.size() - 1, list.size() - 1); if (list.size() == 1)
list.addElement(object); int index = list.size() - 1; fireIntervalAdded(this, index, index); if (list.size() == 1 && selectedItem == null)
  public void addElement(Object object)  {    list.add(object);    fireIntervalAdded(this, list.size() - 1, list.size() - 1);    if (list.size() == 1)      setSelectedItem(object);  }