maxHeight = 0;
    public void treeCollapsed(TreeExpansionEvent event)    {      validCachedPreferredSize = false;      treeState.setExpandedState(event.getPath(), false);      tree.revalidate();      tree.repaint();    }