int row = BasicListUI.this.convertYToRow(event.getY()); if (row == -1)
Point click = event.getPoint(); int index = BasicListUI.this.locationToIndex(list, click); if (index == -1)
    public void mousePressed(MouseEvent event)    {      int row = BasicListUI.this.convertYToRow(event.getY());      if (row == -1)        return;      BasicListUI.this.list.setSelectedIndex(row);    }