public synchronized ComboBox<V> addItem(int index,V item){
  if (item == null) {
    throw new IllegalArgumentException("Cannot add null elements to a ComboBox");
  }
  items.add(index,item);
  if (index <= selectedIndex) {
    setSelectedIndex(selectedIndex + 1);
  }
  invalidate();
  return this;
}

public synchronized ComboBox < V > addItem ( int index , V item ) { if ( item == null ) { throw new IllegalArgumentException ( "Cannot add null elements to a ComboBox" ) ; } items . add ( index , item ) ; if ( index <= selectedIndex ) { setSelectedIndex ( selectedIndex + 1 ) ; } invalidate ( ) ; return this ; }
adds a new item to the combo box , at a specific index
