} else if(dataModel instanceof MutableComboBoxModel){  MutableComboBoxModel mcbm = (MutableComboBoxModel) dataModel;   for(int i=mcbm.getSize()-1; i >= 0; i--) { mcbm.removeElementAt(i); }  } else { throw new RuntimeException("Unable to remove the items because the data model it is not an instance of MutableComboBoxModel."); }
  public void removeAllItems()  {    if (dataModel instanceof DefaultComboBoxModel)      ((DefaultComboBoxModel) dataModel).removeAllElements();  }