Skip to content
Advertisement

Invert the Selection in JTable

On clicking a button, I want the selected rows to be inverted (non-selected rows should be selected and selected rows should be non-selected).

Is there a build-in method in JTable to do it?

Advertisement

Answer

JTable doesn’t seems to have a built-in way of doing this. So I implemented it with the following code. (Hope this is helpful for someone who is facing a similar issue.)

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement