AbstractTableModel, AbstractListModel and Selection Mode

Hi,

I am creating my own custom ListModel by extending the AbstractListModel. I want to set the set the selection mode to SINGLE selection. Anything that makes use of the custom ListModel should by default only be able to select one row at a time, unless they override a method to set the selection to something else. I'm guessing I need to make use of ListSelectionModel.

I have an interface which will be implemented by AbstractListModel, and the AbstractTableModel too. The selection needs to be set to SINGLE selection for both.

Can anyone give some ideas - I can't find any examples on ListSelectionModel.

Thanks.

[651 byte] By [sand_samuraia] at [2007-11-27 10:50:08]
# 1

Crosspost: http://forum.java.sun.com/thread.jspa?threadID=5195779&tstart=0

java_knighta at 2007-7-29 11:23:29 > top of Java-index,Desktop,Core GUI APIs...