JTree.this.repaint();
TreePath[] changed = ev.getPaths(); for (int i = 0; i < changed.length; i++) { repaint(getPathBounds(changed[i])); }
    public void valueChanged(TreeSelectionEvent ev)    {      TreeSelectionEvent rewritten =        (TreeSelectionEvent) ev.cloneWithSource(JTree.this);      fireValueChanged(rewritten);      JTree.this.repaint();    }