title: Receiving an Exception in thread "AWT-EventQueue-0" java.lang.ArrayStoreException
body: <p>Here is the exception I am receiving:   </p>
  
  <p>Exception in thread "AWT-EventQueue-0" java.lang.ArrayStoreException</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public class LeagueTable extends JTable {
  
      public static final Dimension INITIAL_SIZE = new Dimension(500, 300);
      public final String[] columnNames;
      DefaultTableModel model;
      JTable table;
  
      public LeagueTable(){
  
          DatabaseConnector listOfTeams = new DatabaseConnector();
          columnNames = new String[]{"Teams", "Goal Difference", "Points", "Verdict"};
          Object[][] data = listOfTeams.teamResults.toArray(new Object[listOfTeams.teamResults.size()][]);
          model = new DefaultTableModel(data, columnNames);
          table = new JTable(model){@Override
                                  public boolean isCellEditable(int row, int column) {
  
              return false;
          }};
  
          JScrollPane pane = new JScrollPane(table);
          setVisible(true);
          setSize(INITIAL_SIZE);
          setLayout(new FlowLayout());
  
          add(pane);
      }
  
      public String[] getStringArray() {
          return columnNames;
      }
  }
  </code></pre>