@Override
    public void mouseClicked(final MouseEvent event) {
      if (!isEnabled()) {
        return;
      }

      // TODO: Somehow find a better way to check
      // whether the checkbox was hit.
      if (event.getPoint().x > 20) {
        return;
      }

      final int row = JCheckedListbox.this.locationToIndex(event.getPoint());

      m_selected[row] = !m_selected[row];

      updateUI();

      fireSelectionValueChanged(row, row, false);
    }
Keeps track of what list items are m_selected.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/JCheckedListbox.java