Home Segments Top Top Previous Next

981: Mainline

Internally, an instance of the JTable class contains several class instances that govern a table's look and behavior. Those class instances belong to classes that implement methods, imposed by interfaces, on which JTable instances depend to display data properly.

*-----------------* 
| JTable instance | 
*-----------------* 
 | | | getModel 
 | | *------------------> instance of DefaultTableModel 
 | | getColumnModel  
 | *------------------> instance of DefaultTableColumnModel 
 | getTableCellRenderer  
 *------------------> instance of DefaultTableCellRenderer 

When you create a table using the simple constructor described in Segment 978, that simple constructor provides a default table model, a default table-column model, a default table-cell renderer, and a default list-selection model, hiding from you all the tedious detail involved.