void (MouseEvent e) { Point point = e.getPoint(); int index = list.locationToIndex(point); if (index != -1) { Rectangle cellBounds = list.getCellBounds(index, index); if (!cellBounds.contains(point) && (KeyEvent.CTRL_DOWN_MASK & e.getModifiersEx()) != KeyEvent.CTRL_DOWN_MASK) { list.clearSelection(); e.consume(); } } }