setModel(new DefaultListModel()); setSelectionModel(createSelectionModel()); setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
model = m; if (model != null) model.addListDataListener(listListener);  selectionModel = createSelectionModel(); if (selectionModel != null) { selectionModel.addListSelectionListener(listListener); selectionModel.setSelectionMode (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); }
  void init()  {    dragEnabled = false;    fixedCellHeight = -1;    fixedCellWidth = -1;    layoutOrientation = VERTICAL;    opaque = true;    valueIsAdjusting = false;    visibleRowCount = 7;    cellRenderer = new DefaultListCellRenderer();    listListener = new ListListener();    setModel(new DefaultListModel());    setSelectionModel(createSelectionModel());    setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);    setLayout(null);    updateUI();  }