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
The following worked for me (called after setting the new model):
for (int i = 0; i < tree.getRowCount(); i++) { tree.expandRow(i); }