title: Create JTable from ArrayList of Objects - Java
body: <p>How do I display my "Click" objects in a JTable?</p>
  
  <pre><code>ArrayList&lt;Click&gt; myClicks = new ArrayList&lt;Click&gt;();
  
  Click click = new Click(620, 1028);
  Click click2 = new Click(480, 230);
  
  myClicks.add(click);
  myClicks.add(click2);
  </code></pre>
  
  <p>It should look something like this:</p>
  
  <pre><code>|---Mouse X---|---Mouse Y---|
  |     620     |     1028    |
  |     480     |      230    |
  </code></pre>
  
  <p>Which is really...</p>
  
  <pre><code>       |              |
         v              v
    click.getX()  click.getY()
    click2.getX() click2.getY()
  </code></pre>
  
  <p>I don't want to use a 2D Object[][] because it makes more sense to keep them as Click objects as long as possible.</p>
  
  <p>I know I probably have to extend the TableModel interface but I'm not sure how.</p>
  
  <p>I'd just like a quick and simple example please (the java docs are a little confusing).</p>