Here you can find the source of expand(JTree tree, int startingIndex, int rowCount)
Stolen from http://stackoverflow.com/a/19935987/5620200
Parameter | Description |
---|---|
tree | a parameter |
startingIndex | a parameter |
rowCount | a parameter |
public static void expand(JTree tree, int startingIndex, int rowCount)
//package com.java2s; //License from project: Open Source License import javax.swing.JTree; public class Main { /**//from w ww. ja va2s. co m * Stolen from http://stackoverflow.com/a/19935987/5620200 * @param tree * @param startingIndex * @param rowCount */ public static void expand(JTree tree, int startingIndex, int rowCount) { for (int i = startingIndex; i < rowCount; ++i) { tree.expandRow(i); } if (tree.getRowCount() != rowCount) { expand(tree, rowCount, tree.getRowCount()); } } }