As you saw in Section 22.214.171.124, “Accessing Table Columns,” on p. 392, the column type determines how the cells are rendered. There are default renderers for the types
Icon that render a checkbox or icon. For all other types, you need to install a custom renderer.
Table cell renderers are similar to the list cell renderers that you saw earlier. They implement the
TableCellRenderer interface which has a single method:
Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
That method is called when the table needs to draw a cell. You return a component whose
paint method is then invoked to fill the ...