Java JTree Expand expandAllNodes(JTree tree)

Here you can find the source of expandAllNodes(JTree tree)

Description

Expands all nodes in a tree

License

Open Source License

Parameter

Parameter Description
tree a parameter

Declaration

public static void expandAllNodes(JTree tree) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JTree;

public class Main {
    /**/* w  ww  . j ava 2  s. c  o m*/
     * Expands all nodes in a tree
     * 
     * @param tree
     */
    public static void expandAllNodes(JTree tree) {
        for (int i = 0; i < tree.getRowCount(); i++) {
            tree.expandRow(i);
        }
    }
}

Related

  1. expandAll(JTree tree, boolean expand)
  2. expandAll(JTree tree, boolean expand)
  3. expandAllNode(JTree tree, TreePath parent)
  4. expandAllNodes(final JTree tree)
  5. expandAllNodes(JTree tree)
  6. expandAllNodes(JTree tree, int startingIndex, int rowCount)
  7. expandAllNodes(JTree tree, int startingIndex, int rowCount)
  8. expandAllNodes(JTree tree, TreeNode node)
  9. expandByExpansionStateStrings(final JTree tree, final TreePath parent, ArrayList expansionStateStrings)