expand All JTree Nodes - Java Swing

Java examples for Swing:JTree

Description

expand All JTree Nodes

Demo Code


//package com.java2s;

import javax.swing.JTree;

public class Main {
    public static void expandAllNodes(JTree tree) {
        for (int i = 0; i < tree.getRowCount(); i++)
            tree.expandRow(i);/*from   w  w  w . j a va 2 s .c  o  m*/
    }
}

Related Tutorials