I have a TableModel that is populated from a background running thread. I am calling fireTableRowsInserted when data is inserted, which is NOT on the EDT.
My question is, do I need to use invokeLater for the fireTableRowsInserted?
In other words, is the below correct:
public void putData(TableRow row) {
// we are not on the EDT here...
rows.add(row);
fireTableRowsInserted(rows.size()-1, rows.size()-1);
}
Well, as this event may trigger table repaint, it should be in the EDT, yes. But you can rely upon
SwingUtilities.invokeLaterto have only the relevant part called in EDT.