void (MouseEvent e, boolean pressed) { Point point = e.getPoint(); int index = locationToIndex(point); if (index >= 0 && index < getModel().getSize()) { JCheckBox cb = getModel().getElementAt(index); cb.getModel().setPressed(pressed); UIUtil.repaintViewport(CheckBoxList.this); } }