i have JTable with one column as default. my program can add columns with spesific value but when i try to add data in spesific row and column, an entire row filled by data. i just want to fill data to spesific row and column. its looks like this code still read number of column as default. i dont know how to solve this. thanks
for (int i = 0; i < NumberOfColumn.length; i++) {
TableColumn tbl = new TableColumn();
tbl.setHeaderValue(i);
table1.getColumnModel().addColumn(tbl);
}
table1.setValueAt(2014, 0, 14);
for example i want to fill data '2014' at row 0 column 14, but when i run this code, all column filled with '2014'