JComboBox CellEditor Does Not Highlight On KeyEvent Selection

Even I was confused why this problem occurred to me. I mean, I have another JComboBox cell editor used in another JTable and there was no problem with the selection highlight when I pressed either the up or down arrow key to navigate through the items.

i double checked line by line and compared my two classes to ensure that there is nothing different with the two of them. And still, the selection highlight problem persisted.

Luckily, there is a property that you can set to a JComboBox cell editor to highlight the selected item when you use the up and down arrow keys.

If you encounter this problem, avoid debugging your code and use this property right away. It took me some time to find out the solution but the fix is pretty quick.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *