When a sorter/autoRowSorter added to JTable that contains with different JCombo Box in the table cell is sorted with column header, Jcombo Box's are not sorted with respective to row.
JCombo Box is clicked to change the data it ended up in showing Model values of combo box rather than view values(Row related Values).
Example found on internet, using the same to illustrate the problem. I have just added setAutoCreateRowSorter(true)
Reference of Code:
how to add different JComboBox items in a Column of a JTable in Swing -- Example is in answer.
Snapshots:
After Sorting the data seems to be changed with respective to view:
But when Combo Box is selected for options, Name Drop-down is shown when we expect to have color:
I do understand that mapping with respective to view is not done correctly when the sorting is done.