expand First JTree Nodes - Java Swing

Java examples for Swing:JTree

Description

expand First JTree Nodes

Demo Code


//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*/
    }
}

Related Tutorials