boolean (@NotNull MouseEvent e, int clickCount) { if (isEnabled()) { int index = locationToIndex(e.getPoint()); if (index != -1) { JCheckBox checkBox = getCheckBoxAt(index); Rectangle bounds = getCellBounds(index, index); if (bounds == null) { return false; } Point p = findPointRelativeToCheckBox(e.getX() - bounds.x, e.getY() - bounds.y, checkBox, index); if (p != null) { Dimension dim = getCheckBoxDimension(checkBox); if (p.x >= 0 && p.x < dim.width && p.y >= 0 && p.y < dim.height) { if (checkBox.isEnabled()) { setSelected(checkBox, index, !checkBox.isSelected()); } return true; } } } } return false; }