public void expandAll(){
  cancelEditing();
  final TreeModel tm=getModel();
  final Object root=tm.getRoot();
  if (root != null) {
    expandAllPaths(new TreePath(root),tm);
  }
}

public void expandAll ( ) { cancelEditing ( ) ; final TreeModel tm = getModel ( ) ; final Object root = tm . getRoot ( ) ; if ( root != null ) { expandAllPaths ( new TreePath ( root ) , tm ) ; } }
expands all paths in the tree .
