I have a custom JTree and a custom JModel; I would for the JTree to \"auto-expand\" when I give it a new model. At the moment, it simply collapse a
JTree
JModel
public void expandTree(){ int row = 1; while (row++ < tree.getRowCount()){ tree.expandRow(row); } public void collapseTree(){ int row = tree.getRowCount() - 1; while (row-- > 0){ tree.collapseRow(row); } }