else if (evt.getKeyCode() == KeyEvent.VK_PAGE_UP) {  } else if (evt.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {  } else if (evt.getKeyCode() == KeyEvent.VK_BACK_SLASH && evt.isControlDown()) { BasicListUI.this.list.clearSelection(); } else if ((evt.getKeyCode() == KeyEvent.VK_HOME) || evt.getKeyCode() == KeyEvent.VK_END) {  int index = (evt.getKeyCode() == KeyEvent.VK_HOME) ? 0 : max;  if (!evt.isShiftDown() ||(BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION)) BasicListUI.this.list.setSelectedIndex(index); else if (BasicListUI.this.list.getSelectionMode() == ListSelectionModel.SINGLE_INTERVAL_SELECTION) BasicListUI.this.list.setSelectionInterval (BasicListUI.this.list.getAnchorSelectionIndex(), index); else BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(index); } else if ((evt.getKeyCode() == KeyEvent.VK_A || evt.getKeyCode() == KeyEvent.VK_SLASH) && evt.isControlDown()) { BasicListUI.this.list.setSelectionInterval(0, max);   BasicListUI.this.list.addSelectionInterval(lead, lead); } else if (evt.getKeyCode() == KeyEvent.VK_SPACE && evt.isControlDown()) { 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();          int max = BasicListUI.this.list.getModel().getSize() - 1;          if (!evt.isShiftDown())            {              BasicListUI.this.list.clearSelection();              BasicListUI.this.list.setSelectedIndex(Math.min(lead+1,max));            }          else             {              BasicListUI.this.list.getSelectionModel().                setLeadSelectionIndex(Math.min(lead+1,max));            }        }      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));            }        }    }