tree.setModel(model);
completeEditing();  if (treeModel != null && treeModelListener != null) treeModel.removeTreeModelListener(treeModelListener);
  protected void setModel(TreeModel model)  {    tree.setModel(model);    treeModel = tree.getModel();    treeState.setModel(treeModel);  }