JTree keep expanding problem
Posted
by newbie123
on Stack Overflow
See other posts from Stack Overflow
or by newbie123
Published on 2010-06-15T14:43:09Z
Indexed on
2010/06/15
14:52 UTC
Read the original article
Hit count: 290
I want to keep my jTree file expanded. I using below code to expand the jTree :
public void expandAll(JTree tree) {
int row = 0;
while (row < tree.getRowCount()) {
tree.expandRow(row);
row++;
}
}
It works, but when I add in new file or delete file the jtree collapse back. How can keep the jTree expanded?
© Stack Overflow or respective owner