I defer to @mKorbel on DefaultTableModel
, which is well suited to cases that can rely on its straightforward mutators. It is limited by the internal use of Vector
, a supported but obsolescent Collection
that carries (possibly) needless synchronization overhead.
AbstractTableModel
offers much more flexibility in exposing your application's data model to a JTable
view. It should be used in cases for which DefaultTableModel
is unsuitable.
Focusing on your question, JTable
implements TableModelListener
, and it listens to its own TableModel
. An arbitrary number of other views can also listens to the same model; DisplayPanel
is an example that listens to an AbstractTableModel
named CheckModel
. Your TableModel
should fire a suitable TableModelEvent
if it contains the data needed by your view(s) to update themselves. If not, you can define your own event types using the same EventListenerList
mechanism used by JTable
, described here, and mentioned here.