I want to set CellEditor with JComboBox for one cell in a JTable. It is one cell rather than the all column, I cannot find a class named Cell in JDK.
This code cannot solve my requirement.
table.getColumnModel().getColumn(columnIndex).setCellEditor(new DefaultCellEditor(new JComboBox));
It's simple. You only need to override the method
getCellRendererofJTable. Here is an example.And here is code for a complete solution, so you can use the table everywhere and can define renderer for any cell.