JComboBox keeps focus after mouse select...
I have an application that consists of a JTable, with both text and numerical editors and column sorting. The value parameters in the table are edited using an Integer Editor and the text values are selected using a ComboBox. The problem I have is that after I click a selection on the ComboBox, the focus remains on the ComboBox and if I don't physically change the focus of the box (click another editor) before I sort the column, I get undefined selection results in the box. I am looking for a way to stopCellEditing() and remove the focus from the edited comboBox automatically after a mouse click selection. Thanks, guys.
[635 byte] By [
ramcsua] at [2007-10-3 10:20:22]

I inherit from DefaultCellEditor and create my own ComboBoxEditor, so it should function as a DefaultCellEditor would. Maybe another example of its erratic actions will help... It seems that sometimes, I will change the value of one combo box and the value of another will change accordingly (to the same value I set in the first combobox). The setSelectedItem() methods are never called for that second one, but the text value is changed, so the next time you click on the faulty box the change is saved. This same thing happens if after changing the first combo box I highlight multiple rows of the JTable. One or two other random boxes along that column will change. I am never telling them to change their values!?
"I inherit from DefaultCellEditor and create my own ComboBoxEditor, so it should function as a DefaultCellEditor would. "I am pretty sure that is not correct.The other problem sounds like an issue with your cell renderer, not the editor. You could post your code.