import javax.swing.table.AbstractTableModel;

public class MyTableModel extends AbstractTableModel {
    public int getRowCount()  // wie viele Zeilen hat die Tabelle?
    {
        return 25;
    }

    public int getColumnCount()  // wie viele Spalten hat die Tabelle?
    {
        return 4;
    }

    public String getColumnName(int col)
    {
        if (col == 0) return ("Spalte A");
        if (col == 1) return ("Spalte B");
        if (col == 2) return ("Spalte C");
        if (col == 3) return ("Spalte D");
        return "";
    }

    public Object getValueAt(int row, int col)
    {
       if((col==3)&&(row==2)) return "Anders";
       return new Integer(row*col);
    }
}
