Here's your original code:
public class RecordTableModel extends AbstractTableModel {
...
public void updateRow(int modelRow,...) {
String query = ...;
Connection conn;
PreparedStatement pstate;
try {
conn = DriverManager.getConnection(...);
pstate = conn.prepareStatement(query);
pstate.executeUpdate();
fireTableRowsUpdated(modelRow, modelRow); // Not Work!
fireTableDataChanged(); // Not Work!
fireTableCellUpdated(modelRow, 1); // Not Work!
} catch (SQLException sql) {
sql.printStackTrace();
}
}
This code does nothing to the data held by the table model itself, and so it should coe as no surprise that calling fireTableXXX(...)
does nothing. If the model is unchanged, you can fire anything you want, and the table won't change.
You should perhaps not be using executeUpdate but executeQuery so you can get a ResultSet from the database, and then use it to update the data held by your table model. Then call your appropriate fireTableXXX(...)
method.