I need to update some cells of a JTable
at a fixed interval within a separate thread from the event dispatch thread. The other cells can only be updated by the event dispatch thread so that the two threads will never update the same cell.
Once you change the data of a JTable
, a common way is to call fireTableRowsUpdated()
to repaint the JTable
. Normally, you call fireTableRowsUpdated()
within the event dispatch thread, but can I call it within another thread? If so, is fireTableRowsUpdated()
thread-safe, too? There's a chance that the JTable
is updated concurrently.