I would like to "grey out" particular rows of a JTable so that they may not be selected by any means. The other rows should still be selectable. How do I accomplish this?
You will want to create a custom TableCellRenderer, one that will display "disabled" information greyed out. Read the Swing Table Tutorial for more on how to create these renderers, especially the section, Concepts: Editors and Renderers.
You can either override
JTable.changeSelection() to deselect the offending row whenever it's selected, or provide your table with a custom
ListSelectionModel where you override
addSelectionInterval(), etc. to prevent the row from being selected in the first place.
Create a temporary
TableModel which has only the rows that you want to select. After the selection made and when you want to revert, change back to original