Point click = event.getPoint(); int index = locationToIndex(list, click); if (index == -1) return; if (!event.isShiftDown() && !event.isControlDown()) list.setSelectedIndex(index);  list.ensureIndexIsVisible(list.getLeadSelectionIndex());
    public void mouseDragged(MouseEvent event)    {      // TODO: What should be done here, if anything?    }