list.add(object); fireIntervalAdded(this, list.size() - 1, list.size());
if (list.size() == 0) { list.add(object); selectedItem = object; fireContentsChanged(this, -1, -1); } else { list.add(object); fireIntervalAdded(this, list.size() - 1, list.size() - 1); }
  public void addElement(Object object)  {    list.add(object);    fireIntervalAdded(this, list.size() - 1, list.size());  }