Tutorial by Examples

Given a JList like JList myList = new JList(items); the selected items in the list can be modified through the ListSelectionModel of the JList: ListSelectionModel sm = myList.getSelectionModel(); sm.clearSelection(); // clears the selection sm.setSelectionInterval(inde...

Page 1 of 1