title: Save objects in a JTree but change the displayed name (java swing)?
body: <p>I have made a JTree and filled it with objects fron an ArrayList.
  When I display the contents of the JTree with my GUI, I dont want to see the memory address wherethe object is stored, but a customized String.</p>
  
  <p>for example: I add this object to my tree:</p>
  
  <pre><code>DefaultMutableTreeNode tempnode = new DefaultMutableTreeNode(workspaces.get(i));
  </code></pre>
  
  <p>And what I see on my GUI is: </p>
  
  <blockquote>
    <p>package.workspace@1df38f3</p>
  </blockquote>
  
  <p>I want alternative text instead of </p>
  
  <blockquote>
    <p>package.workspace@1df38f3</p>
  </blockquote>
  
  <p>To be displayed.
  How can I fix my code to support this?</p>