tableModel.addRow(new Person("Test", "Person", "test@test.de", new Date()));
/* Add a debugging model change listener to the table data model */
tableModel.addModelChangeListener(new ModelChangeListener() {
public void modelChanged(ModelChangeEvent e) {
TableChangeEvent event = (TableChangeEvent) e;
log.debug(
"Table data model change : "
+ event.getKey()
+ "["
+ event.getFirstIndex()
+ "] -> '"
+ ((TableDataModel) event.getModel()).getValue(event.getFirstIndex(), event.getKey())
+ "'");
}
});
/* Add a debugging model change listener to the window data model */
model.addModelChangeListener(new ModelChangeListener() {
public void modelChanged(ModelChangeEvent e) {
MapChangeEvent event = (MapChangeEvent) e;
log.debug("Data model change : '" + event.getKey() + "' => '" + event.getNewValue() + "'");
}
});
/* Create the window */
frame = constructFrame("TestFrame", model);