title: Speed up expand/collapse all nodes of a JTree
body: <p>I have a JTree with about 100000 nodes or more. Now I want to expand the whole tree. To do so I use the solution I found <a href="https://web.archive.org/web/20121022094801/http://exampledepot.com/egs/javax.swing.tree/ExpandAll.html" rel="nofollow noreferrer">here</a>.</p>
  
  <p>My problem is that expanding such a large tree takes like 60 seconds or more, which is not very convenient. Does anyone have any suggestions how I could speed up expansion?</p>