title: From text file to tree structure view using jtree
body: <p>I am using JTree to build folder tree structure(GUI), I can build it manually if I know proper file structure. I want to implement this structure reading structure specified in text file, which is dynamic. I am bit poor in coding recursion type problems. Please help me</p>
  
  <p>If in text file structure is as shown below</p>
  
  <h2>label - level</h2>
  
  <p>root - 0
  LivingBeings - 1
  animals - 2
  dog - 3
  cat - 3
  birds - 2
  peacock - 3
  crow - 3</p>
  
  <p>I need a tree structure like as shown in image<img src="https://i.stack.imgur.com/xVRyW.png" alt="enter image description here"></p>