/**********************************************************
* ListSelectionListener *
**********************************************************/
public void valueChanged(ListSelectionEvent e) {
super.valueChanged(e);
DatasetEditorModel model = getModel();
if (model.isInserting() && !e.getValueIsAdjusting()) {
int insertRowIndex = getModel().getInsertRowIndex();
if (insertRowIndex != -1 && (insertRowIndex == e.getFirstIndex() || insertRowIndex == e.getLastIndex()) && getSelectedRow() != insertRowIndex) {
try {
model.postInsertRecord(false, true);
} catch (SQLException e1) {
MessageUtil.showErrorDialog("Could not create row in " + getDataset().getQualifiedNameWithType() + ".", e1);
}
}
}