How to render boolean value as checkbox in JTable component?
To make a
JTable renders a boolean as a checkbox in the table cell we need to tell the table that a cell stores a boolean type of data. To do this we have to implement a
TableModel for the
getColumnClass(int columnIndex) must return the type of data stored in a cell. When it returns that the column stored a
JTable displays a checkbox as the default renderer or editor for that cell.