title: Jtable as a Jtree Node
body: <p>I know you can create a <a href="https://stackoverflow.com/questions/7122901/java-swing-table-tree">table and add a JTree as a column</a>. But what I want to do is the complete opposite.</p>
  
  <p>Check the image and tell me if this is possible. Thanks!</p>
  
  <p><img src="https://i.stack.imgur.com/DqpAD.jpg" alt="enter image description here"></p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>By using MKorbel's code and by randomizing the number of columns with the following code:</p>
  
  <pre><code>@Override
  public int getColumnCount() {
      int i = (int) (Math.random( )* 10.0);
      if (i%2 ==0)
          return 2;
      else
          return 3;
  }
  </code></pre>
  
  <p>I was able to get the following image:</p>
  
  <p><img src="https://i.stack.imgur.com/EV3ki.png" alt="enter image description here"></p>