What is "tablemodel"
Tablemodel is an interface included in the package javax.swing.table, defining a contract to work with the component Jtable. This interface provides methods to control table content, accept cell editing events, and support data events through the interface Tablemodellistener.
There are two known implementations: Abstracttablemodel and Defaulttablemodel. The first is an abstract implementation that provides event manipulation and several standard implementations for methods related to table content. The second is a complete implementation based on AbstractTableModel
.
Developers have the ability to create their own implementation of the TableModel
, either by extension AbstractTableModel
or by implementing the entire interface from scratch. An example is shown in Creating a Table Model in the section How to Use Tables on the official Oracle website.