Java Swing TanleModel fireTableRowsInserted on EDT
Posted
by Ayman
on Stack Overflow
See other posts from Stack Overflow
or by Ayman
Published on 2010-04-19T12:30:25Z
Indexed on
2010/04/19
12:33 UTC
Read the original article
Hit count: 351
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);
}
© Stack Overflow or respective owner