My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://mindsiview.wordpress.com/ and update your bookmarks.

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:
for (int i = 0; i < tree.getRowCount(); i++) 
    {
     tree.expandRow(i); // tree is your JTree component
     }
Thanks Javalobby for providing this example.

No comments:

Technorati search