if (treeModelListener == null) treeModelListener = createTreeModelListener(); model.addTreeModelListener(treeModelListener);
  public void setModel(TreeModel model)  {    if (treeModel == model)      return;    TreeModel oldValue = treeModel;    treeModel = model;    firePropertyChange(TREE_MODEL_PROPERTY, oldValue, model);    // add treeModelListener to the new model    if (treeModelListener == null)      treeModelListener = createTreeModelListener();    model.addTreeModelListener(treeModelListener);  }