@Override
    public Component getListCellRendererComponent(
        final JList<? extends T> list,
        final T value,
        final int index,
        final boolean iss,
        final boolean chf) {
      checkBox.setEnabled(JCheckedListbox.this.isEnabled());

      if (m_selectCompleteLine) {
        setBorder(iss ? SELECTED_BORDER : UNSELECTED_BORDER);
        setBackground(iss ? SELECTED_COLOR : UNSELECTED_COLOR);
        checkBox.setBackground(iss ? SELECTED_COLOR : UNSELECTED_COLOR);
      }

      checkBox.setText(value.toString());
      checkBox.setSelected(m_selected[index]);

      checkBox.updateUI();

      add(checkBox, BorderLayout.WEST);

      return this;
    }
Keeps track of what list items are m_selected.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/JCheckedListbox.java