m1.addColumn("C4", columnData1);
harness.check(m1.getColumnCount(), 4); // 1
harness.check(m1.getColumnName(3), "C4"); // 2
harness.check(m1.getValueAt(0, 3), "V1"); // 3
harness.check(m1.getValueAt(1, 3), "V2"); // 4
TableModelEvent event = listener1.getEvent();
harness.check(event.getType(), TableModelEvent.UPDATE); // 5
harness.check(event.getColumn(), TableModelEvent.ALL_COLUMNS); // 6
harness.check(event.getFirstRow(), -1); // 7
harness.check(event.getLastRow(), -1); // 8
// too few data values
DefaultTableModel m2 = new DefaultTableModel(2, 3);
MyTableModelListener listener2 = new MyTableModelListener();
m2.addTableModelListener(listener2);
Vector columnData2 = new Vector();
columnData2.add("V1");
m2.addColumn("C4", columnData2);
harness.check(m2.getColumnCount(), 4); // 9
harness.check(m2.getColumnName(3), "C4"); // 10
harness.check(m2.getValueAt(0, 3), "V1"); // 11
harness.check(m2.getValueAt(1, 3), null); // 12
event = listener2.getEvent();
harness.check(event.getType(), TableModelEvent.UPDATE);
harness.check(event.getColumn(), TableModelEvent.ALL_COLUMNS);
harness.check(event.getFirstRow(), -1);
harness.check(event.getLastRow(), -1);
// too many data values
DefaultTableModel m3 = new DefaultTableModel(
new Object[] {"C1", "C2", "C3"}, 2);
Vector columnData3 = new Vector();