if (this.dataModel != null)  dataModel.addListDataListener(this);
ComboBoxModel oldDataModel = dataModel; dataModel = newDataModel;
  public void setModel(ComboBoxModel newDataModel)  {    if (this.dataModel == newDataModel)      return;    if (this.dataModel != null)      // remove all listeners currently registered with the model.      dataModel.removeListDataListener(this);    ComboBoxModel oldDataModel = this.dataModel;    this.dataModel = newDataModel;    if (this.dataModel != null)      // register all listeners with the new data model      dataModel.addListDataListener(this);    firePropertyChange(MODEL_CHANGED_PROPERTY, oldDataModel, this.dataModel);  }