BasicListUI.this.list.getSelectionModel().setLeadSelectionIndex(lead+1);
BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max));
    public void keyPressed( KeyEvent evt )     {      if (evt.getKeyCode() == KeyEvent.VK_DOWN)        {          int lead = BasicListUI.this.list.getLeadSelectionIndex();          if (!evt.isShiftDown())            {              BasicListUI.this.list.clearSelection();              BasicListUI.this.list.setSelectedIndex(lead+1);            }          else             {              BasicListUI.this.list.getSelectionModel().setLeadSelectionIndex(lead+1);            }        }      else if (evt.getKeyCode() == KeyEvent.VK_UP)        {          int lead = BasicListUI.this.list.getLeadSelectionIndex();          if (!evt.isShiftDown())            {              BasicListUI.this.list.clearSelection();              BasicListUI.this.list.setSelectedIndex(Math.max(lead-1,0));            }          else            {              BasicListUI.this.list.getSelectionModel().setLeadSelectionIndex(Math.max(lead-1,0));            }        }    }