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?