Here you can find the source of expandAllNodes(final JTree tree)
Parameter | Description |
---|---|
tree | The tree. |
public static void expandAllNodes(final JTree tree)
//package com.java2s; /*/*from www . j av a 2 s .co m*/ * 09/08/2005 * * UIUtil.java - Utility methods for org.fife.ui classes. * Copyright (C) 2005 Robert Futrell * http://fifesoft.com/rtext * Licensed under a modified BSD license. * See the included license file for details. */ import javax.swing.JTree; public class Main { /** * Expands all nodes in the specified tree. * * @param tree The tree. */ public static void expandAllNodes(final JTree tree) { // Do separately for nested panels. int j = 0; while (j < tree.getRowCount()) { tree.expandRow(j++); } } }