void (final JBList list) { final ListSelectionModel listSelectionModel = list.getSelectionModel(); listSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); if (list.getModel().getSize() == 0) { list.clearSelection(); } }