public synchronized void removeItem(int i){
  model.remove(i);
  realModel.remove(i);
  editor.setText("");
  ListDataEvent event=new ListDataEvent(model,ListDataEvent.INTERVAL_REMOVED,i,i);
  for (int j=0; j < listeners.size(); j++) {
    ListDataListener listener=listeners.get(j);
    listener.intervalRemoved(event);
  }
}

public synchronized void removeItem ( int i ) { model . remove ( i ) ; realModel . remove ( i ) ; editor . setText ( "" ) ; ListDataEvent event = new ListDataEvent ( model , ListDataEvent . INTERVAL_REMOVED , i , i ) ; for ( int j = 0 ; j < listeners . size ( ) ; j ++ ) { ListDataListener listener = listeners . get ( j ) ; listener . intervalRemoved ( event ) ; } }
removes an item from the list .
