Java examples for Swing:JTree
expand First JTree Nodes
//package com.java2s; import javax.swing.JTree; public class Main { public static void expandFirstNodes(JTree tree) { for (int i = tree.getRowCount() - 1; i >= 0; i--) tree.expandRow(i);/*from w w w . jav a2 s. co m*/ } }