Select single column but multiple rows in JTable

Hi

I have a jTable and want to be able to select multiple rows but only in a single column.

I've set these properties which makes selection almost the way I would like it.

table1.setCellSelectionEnabled(true);

table1.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);

the only problem now is that the user can select multiple columns.

Is there a simple way to restrict selection to single column?

regards

abq

[510 byte] By [abq@home.sea] at [2007-11-26 15:05:21]
# 1

table.setCellSelectionEnabled(true);

table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);

DefaultListSelectionModel model =

(DefaultListSelectionModel)table.getColumnModel().getSelectionModel();

model.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

camickra at 2007-7-8 8:55:08 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thank youThis works really good. regards abq
abq@home.sea at 2007-7-8 8:55:08 > top of Java-index,Desktop,Core GUI APIs...