So, here's my code:
ScheduleTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{"", null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"User 1 Schedule", "User 2 Schedule", "Free time", "Duration"
}
) {
Class[] types = new Class [] {
java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
So, I was thinking that I should replace the:
{"", null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
to the chosen item from the combo box?
In my combo box, I have about 20 choices. And when the user picks one, it is displayed in the table.