title: BST graphical representation needed in java
body: <p>I am using <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" rel="nofollow noreferrer">Model–view–controller</a> design pattern, I need a UI Viewer for my BST/AVL models ,<strong>I already developed the Model and controller logics, I just need the viewer</strong>,  I do not need to deal with graphics right now, it would be useful if someone has a <strong>Viewer</strong> class with a method that takes the root of a tree and draws it, no need for advanced animation or effects</p>
  <p>something like</p>
  <pre><code>SimpleBSTreeViewer.draw(myTree.getRoot());
  </code></pre>
  <p>node structure of the tree</p>
  <pre><code>public class NodeBST &lt;T extends Comparable&lt;T&gt;&gt; {
   private T data;
   private NodeBST&lt;T&gt; left;
   private NodeBST&lt;T&gt; right;
   private NodeBST&lt;T&gt; parent;
   
   //other methods go here ...
  }
  </code></pre>
  <p>this would be helpful to focus of coding the logic part,</p>
  <p>I have searched and found other java applets that represents trees but they have the model-logic and view in same class , I  am working in model-view-controller pattern (MVC pattern) , it is better to separate model from view as much as possible , I just want a viewer for my model</p>
  <p>-Note: this is a sample of what i need (I already use JTree and it is not satisfactory.)</p>
  <p><img src="https://i.stack.imgur.com/7i0a7.png" alt="enter image description here" /></p>