Originally posted by Oliver Brocker:
...But I want that the user cannot select any cell. So is there a way to disable the selectionmode? Unfortunately there is no NONE_SELECTION alternative.
You can do it in two ways:
1) Listen to row selections using a selection listener. On receiving the selection notifications, make a call to JTable#clearSelection
2) Provide renderers and tweak the selection background and selection foreground to be the same as the default background and foreground. Mind you in this case, any call to the table's selection model
will return data as you are tweaking only the visual part and not touching the underlying selection model.