import javax.swing.table.AbstractTableModel; import java.util.ArrayList; class PatioProjectTableModel extends AbstractTableModel { private String[] columnNames = {"shape", "dimension", "material", "cost"}; // each elemnt's property in separate arrays: private ArrayList shapeList; private ArrayList widthList; private ArrayList lengthList; private ArrayList materialList; private ArrayList costList; /** * constructor */ public PatioProjectTableModel() { super(); shapeList = new ArrayList(); widthList = new ArrayList(); lengthList = new ArrayList(); materialList = new ArrayList(); costList = new ArrayList(); } /** * column count */ public int getColumnCount() { return columnNames.length; } /** * row count */ public int getRowCount() { // just assume that all arrays are the same size return shapeList.size(); } /** * column name */ public String getColumnName(int col) { return columnNames[col]; } ... more code which isn't finished }