title: Create jTable with ArrayList
body: <p>I searched for a while but I cant find a solution for my problem.</p>
  
  <p>I want to display the Values of an ArrayList in a JTable, i'm pretty new to this and cant fix the error.</p>
  
  <pre><code>package Statistik;
  
  import java.util.ArrayList;
  import javax.swing.JFrame;
  import javax.swing.JScrollPane;
  import javax.swing.JTable;
  
  public class Statistic {
  
      private static ArrayList&lt;String&gt; rowA = new ArrayList();
      private static ArrayList&lt;String&gt; rowB = new ArrayList();
      private static ArrayList&lt;String&gt; rowC = new ArrayList();
      private static ArrayList&lt;String&gt; titel = new ArrayList();
      private static ArrayList&lt;Object&gt; table = new ArrayList();
  
      public static void main(String[] args) {
  
          titel.add("Name");
          titel.add("Art der Bearbeitung");
          titel.add("Datum");
  
          addRows("buchung", "Created", "10.10.10");
          addRows("buchung", "Created", "10.10.10");
          addRows("buchung", "Created", "10.10.10");
          addRows("buchung", "Created", "10.10.10");
          addRows("buchung", "Created", "10.10.10");
  
          table.add(rowA);
          table.add(rowB);
          table.add(rowC);
  
  
          // Das JTable initialisieren
          JTable EndTable = new JTable( table , titel );
  
          JFrame frame = new JFrame( "Demo" );
          frame.getContentPane().add(new JScrollPane( EndTable ) );
          frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          frame.pack();
          frame.setVisible( true );
      }
  
      public static void addRows(String rowa, String rowb, String rowc) {
  
          rowA.add(rowa);
          rowB.add(rowb);
          rowC.add(rowc);
  
      }
  
  }
  </code></pre>
  
  <p>I can't set the <code>ArrayList</code> <code>table</code> as first Value in my <code>EndTable</code>, but i dont know how I should do otherwise.</p>
  
  <p>Thank you all for trying to answer my problem.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>My goal is to make a List with</p>
  
  <p>Entity-Name,  art of change,  Date</p>
  
  <p>so I thought it would be the best to use an ArrayList because it's flexible.
  It have to be flexible because we dont know how much the user will change.</p>