Search code examples
javaswingjtablecelljcheckbox

SWING - Multiple JCheckBox in a JTable cell


I've a JTable where each cell from a column to contain a list of JCheckBox (to select multiple skills from the list) Any idea how to do that or an alternate way?

Thanks,


Solution

  • You can use a JPanel (and add desired amount of JCheckboxes to the panel) as the TableCellRenderer.

    Or you can create a TableCellRenderer based on JTable (e.g. 1 column with checkboxes in rows)