I have constructed a Property Sheet using a JTable. The property sheet is 2 columns Name and Value. The some values in the property sheet are editable. In one instance the value in a specific row/column can be one of a list of values a great place for a ComboBox. I have seen lots of examples of setting a ComboBox editor for all the cells in a column but how do I apply a cell editor to a specific cell at row 5, column 1? Or is there a better way than using a Cell Editor?
JTable has a method "public TableCellEditor getCellEditor(int row, int column)" which returns the actual TableCellEditor to use. (There is a sibling for TableCellRenderer as well.) By overriding that and returning something else you can actually determine for each cell separately which renderer / editor to return. Keep in mind though that those row and column numbers are from the JTable's point of view; use convertRowIndexToModel and convertColumnIndexToModel to get the row and column numbers from the TableModel's point of view.