I have a JTable with a number of rows, each row made up of a number of JPanels. I want one of the rows in the JTable to be unselectable. I have used a:
panel.setFocusable(false);
on this particular row. However, when pressing the down arrow key on the table, the selection disappears when it gets to the unfocusable panel. Is there a quick way of skipping the selection all together on this row and just selecting the next row?
You can achieve that with help of
ListSelectionListener
. Read more How to Write a List Selection Listener. Simple example: