return columnNames[col];
}
public Object getValueAt(int row, int col) {
Object value = null;
Patient p;
synchronized(patients) {
p = patients.get(row);
}
switch(col) {
case 0:
value = p.getPatientInfo().getName();
break;
case 1:
value = p.getPatientInfo().getAge();
break;
case 2:
value = p.getPatientInfo().getGender();
break;
case 3:
try {
value = p.getBed().getRoomNumber();
} catch (IOException e) {
value = e.getClass().getName()+": "+e.getLocalizedMessage();
}
break;
case 4:
try {
value = p.getDoctor().getName();
} catch (IOException e) {
value = e.getClass().getName()+": "+e.getLocalizedMessage();
}
}
return value;