for (int i = 0; i < tree.getRowCount(); i++) { tree.expandRow(i); // tree is your JTree component }Thanks Javalobby for providing this example.
Friday, February 09, 2007
I love Simple Solutions
While developing a a JTree TreeModel built from a MySQL database (I'll post an example later), I found the following simple approach for expanding all the nodes at once:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment