How will I populate a JTable with values from a List with an Object Type.
My Code looks like this :
String[] columnNames = {"CLASS CODE",
"TIME",
"DAY",
"ROOM",
"PROFESSOR"};
List<org.mine.ScheduleAttr> schedule = getStudSched(studNo);
DefaultTableModel model = new DefaultTableModel();
table.setModel(model);
model.setColumnIdentifiers(columnNames);
I already have the columns, the list would come from the schedule variable ? How can I put that to my table considering these columns ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…