Hi,
I am trying to create a JCombobox cell Editor for JTable by following the instructions given in the below url,
How to create JComboBox cell editor for JTable
https://www.codejava.net/java-se/swing/how-to-create-jcombobox-cell-editor-for-jtable
Getting the look & feel as expected. Able to change the menu selection. But the change in menu selection not persisting with different row selection. I mean, when I try to select the different row, unable to persist the menu selection change.
Ex: I've two rows, row1 & row2. Column 5 is named as 'Status' with different status values like 'Review', 'Complete', 'Progress', 'Inactive' ..etc. Initially row-1 is having status as 'Review' and row-2 is having status as 'Complete'. I tried to change the status of row-1 to 'Progress'. Till now, it's ok. Now I am selecting the row-2, the status of row-1 is changed to 'Review' which is it's initial value.
I tried to debug the code. Found that, setValueAT() method of AcmsFilesTableModel extends AbstractTableModel is not getting the changed selected value.
public void setValueAt(Object value, int row, int column) {}
Do we need to do any thing to persist the selected value in combobox? Please correct me if Iam doing something wrong.
Please find the attached table model & cell editor implementation classes.