Dynamically add nodes in a JTree
<p>I have data like this (has other data like percentage, but is not important now) in a List that can vary:</p>

<pre><code>1        
1.1    
1.1.1  
1.1.2  
1.2        
2     
2.1
2.2 
</code></pre>

<p>How i easily work with the levels to build a proper JTree for any given levels?
Can be done with recursion?
What the best way?</p>

<p>Thank you so much.</p>