how to add a row to database from tableModel
hi friends,
i wnt to know that is it possible that when i add some rows in a table which has been created by a table model to add those rows to database like what happen in MS Access when u add rows and close the window the rows are automatically added to database
i want to know where to add the listener for that and which listener to use ?
[361 byte] By [
i_virusa] at [2007-10-2 1:08:13]

frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent evt) {
//your closing code
}
});
thanks Andre,
but i have solved my problem in a different way, i have used
method SetValueAt() of AbstractTableModel which i have used to
create the table
actaully my question was little confusing, i wanted
to add rows as soon as the user has finished entering
a new row...it would be better if it could be done for
every cell but that would be more complex...