ListModel old = model; if (old != null) old.removeListDataListener(listListener); model = m; if (model != null) model.addListDataListener(listListener); firePropertyChange(MODEL_PROPERTY_CHANGED, old, m);
if (this.model == model) return;  if (this.model != null) this.model.removeListDataListener(listListener);  ListModel old = this.model; this.model = model;  if (this.model != null) this.model.addListDataListener(listListener);  firePropertyChange(MODEL_PROPERTY_CHANGED, old, model);
  public void setModel(ListModel m)  {    ListModel old = model;    if (old != null)      old.removeListDataListener(listListener);    model = m;    if (model != null)      model.addListDataListener(listListener);    firePropertyChange(MODEL_PROPERTY_CHANGED, old, m);    revalidate();    repaint();  }