Java Swing TableModel fireTableRowsInserted on EDT
I have a TableModel that is being populated by a background thread. I call fireTableRowsInserted when data is inserted, which is NOT on EDT.
My question is, do I need to use invokeLater for fireTableRowsInserted?
In other words, this is correct:
public void putData(TableRow row) {
// we are not on the EDT here...
rows.add(row);
fireTableRowsInserted(rows.size()-1, rows.size()-1);
}
+2
a source to share