private void expandTree(){
  if (treeExpand.isSelected()) {
    for (int row=0; row < tree.getRowCount(); row++)     tree.expandRow(row);
  }
 else {
    for (int row=tree.getRowCount(); row > 0; row--)     tree.collapseRow(row);
  }
}

private void expandTree ( ) { if ( treeExpand . isSelected ( ) ) { for ( int row = 0 ; row < tree . getRowCount ( ) ; row ++ ) tree . expandRow ( row ) ; } else { for ( int row = tree . getRowCount ( ) ; row > 0 ; row -- ) tree . collapseRow ( row ) ; } }
clicked on expand all
