title: Taking tar -tf output and putting it into a java jtree
body: <p>I want to take the output of a tar -tf which is a long directory listing for linux filesystem and put it into a java jtree.  </p>
  
  <p>The problem I am running into is how to get the hierarchy correct.  The root node is easy but how do I add the other nodes to the tree in the proper place?  I believe it would involve finding the parent node in the tree.</p>
  
  <p>So far I am using DefaultMutableTreeNode as the root and creating a new one for each node.  I created a custom object overriding toString to give the name of the directory or file, a getPath that returns the full path to it and getParent which is the full path without the name on the end.</p>