treeState.setRootVisible(tree.isRootVisible());
    public void propertyChange(PropertyChangeEvent event)    {      if ((event.getPropertyName()).equals("rootVisible"))        {          validCachedPreferredSize = false;          tree.repaint();        }    }