expand JTree - Java Swing

Java examples for Swing:JTree

Description

expand JTree

Demo Code


//package com.java2s;

import javax.swing.JTree;

public class Main {
    public static void expandJTree(JTree toexpand) {
        // replace this with a sensible implementation if it fails
        for (int row = 0; row < toexpand.getRowCount(); ++row) {
            toexpand.expandRow(row);/*w  ww  . j a  v a2 s  .  c om*/
        }
    }
}

Related Tutorials