tree.setFont(null); tree.setForeground(null); tree.setBackground(null);  uninstallKeyboardActions();  tree.removePropertyChangeListener(propertyChangeListener); tree.removeFocusListener(focusListener); tree.removeTreeSelectionListener(treeSelectionListener); tree.removeMouseListener(mouseListener); 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);  tree = null; uninstallComponents(); completeUIUninstall();
super.uninstallUI(c);
  public void uninstallUI(JComponent c)  {    tree.setFont(null);    tree.setForeground(null);    tree.setBackground(null);        uninstallKeyboardActions();        tree.removePropertyChangeListener(propertyChangeListener);    tree.removeFocusListener(focusListener);    tree.removeTreeSelectionListener(treeSelectionListener);    tree.removeMouseListener(mouseListener);    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);        tree = null;    uninstallComponents();    completeUIUninstall();  }