TreeModel tm = tree.getModel(); if (tm != null) tm.removeTreeModelListener(treeModelListener); }
if (treeModel != null) treeModel.removeTreeModelListener(treeModelListener); }
	protected void uninstallListeners()	{		tree.removePropertyChangeListener(propertyChangeListener);		tree.removeFocusListener(focusListener);		tree.removeTreeSelectionListener(treeSelectionListener);		tree.removeMouseListener(mouseInputListener);		tree.removeKeyListener(keyListener);		tree.removePropertyChangeListener(selectionModelPropertyChangeListener);		tree.removeComponentListener(componentListener);		tree.removeTreeExpansionListener(treeExpansionListener);        TreeCellEditor tce = tree.getCellEditor();    if (tce != null)      tce.removeCellEditorListener(cellEditorListener);    TreeModel tm = tree.getModel();    if (tm != null)      tm.removeTreeModelListener(treeModelListener);	}