public void removeElementAt(int index){
  if (getElementAt(index) == m_selectedObject) {
    if (index == 0)     setSelectedItem(getSize() == 1 ? null : getElementAt(index + 1));
 else     setSelectedItem(getElementAt(index - 1));
  }
  p_data.remove(index);
  fireIntervalRemoved(this,index,index);
}

public void removeElementAt ( int index ) { if ( getElementAt ( index ) == m_selectedObject ) { if ( index == 0 ) setSelectedItem ( getSize ( ) == 1 ? null : getElementAt ( index + 1 ) ) ; else setSelectedItem ( getElementAt ( index - 1 ) ) ; } p_data . remove ( index ) ; fireIntervalRemoved ( this , index , index ) ; }
remove item at index
