Table.addRow() não adiciona linha

Tenho tentado adicionar arrays de Objetos à novas linhas em uma tabela com o método JTable.addRow(Object[]rowData) e não funciona, no entanto o método addColumn funciona normalmente.

import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
 
public class TableDemo {   
  
    static JTable jTable1 = new javax.swing.JTable();
    static java.util.List<java.util.List<String>>values=new ArrayList();       
    
    void implementerOfValues(){           
        for(int i=0;i<3;i++)
        {
        values.add(new ArrayList<String>(Arrays.asList("Buenos Aires", "Cordoba", "La Plata","James")));   
        }        
    }
    
    void updateTableValues(JTable table)
    {
        DefaultTableModel defaultTable=new DefaultTableModel();        
        for(List row:values)
        {            
        defaultTable.addRow(row.toArray());
        }        
        table.setModel(defaultTable);      
    }  
 
    public static void main(String[] args) {
      
        JFrame frame = new JFrame("TabDemo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);      
        
        frame.getContentPane().add(jTable1);    
        TableDemo demo = new TableDemo();
        demo.implementerOfValues();
        demo.updateTableValues(jTable1);
       
        frame.pack();
        frame.setVisible(true);
    }
}

Obrigado.

Solucionado:

[quote]The DefaultTableModel needs to know the number of columns. Usually you would create the DefaultTableModel with a Vector/Array of the columns names.

Or for a quick test you can use the default columns names by just using:

DefaultTableModel defaultTable=new DefaultTableModel(0, 3);[/quote]

O melhor seria não usar esse método, e sim, montar seu próprio TableModel. Minha assinatura tem um link contendo diversos exemplos de como fazer isso.