Etwas in der Art? --> Clients sind quasi die Entities die du übergibst und anzeigen willst
Code:
Vector<Client> clients = controller.getClients();
if (clients != null && clients.size() > 0) {
DefaultTableModel model = (DefaultTableModel) jTableSearchResult
.getModel();
model.setRowCount(clients.size());
for (int i = 0; i < clients.size(); i++) {
model.setValueAt(clients.elementAt(i).getNumber(), i, 0);
model.setValueAt(SwingHelper.DateToString(clients.elementAt(i)
.getBirthdate()), i, 1);
model.setValueAt(clients.elementAt(i).getFirstName(), i, 2);
model.setValueAt(clients.elementAt(i).getFirstName2(), i, 3);
model.setValueAt(clients.elementAt(i).getName(), i, 4);
model.setValueAt(clients.elementAt(i).getTitle(), i, 5);
}
} else {
DefaultTableModel model = (DefaultTableModel) jTableSearchResult
.getModel();
model.setRowCount(0);
}