I have added a JCheckBox in a cell of a JTable. But when the frame containing the JTable loads i can not see the JCheckBox in the JTable. Instead of the component it shows true/false values of the JCheckBox when i click on that cell.
checkbox_column=table.getColumnModel().getColumn(4);
checkbox_column.setCellEditor(new DefaultCellEditor(checkbox));
Also how to disable the column re positioning when you drag it in JTable?
You set the cellEditor which handles in-place edits of the cell. The general painting of the cell is handled by the cell renderer which is set via
setCellRenderer()To disable column reordering, you want