Here you can find the source of expandAllNodes(JTree tree)
Parameter | Description |
---|---|
tree | a parameter |
public static void expandAllNodes(JTree tree)
//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); } } }