TreePath start = BasicTreeUI.this.tree.getLeadSelectionPath(); DefaultMutableTreeNode last = null;  if (start != null) last = (DefaultMutableTreeNode) start.getLastPathComponent(); if (last != null) { if (e.getKeyCode() == KeyEvent.VK_DOWN) { DefaultMutableTreeNode next = (DefaultMutableTreeNode) BasicTreeUI.this.getNextVisibleNode(last);  if (next != null) BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, new TreePath(next.getPath())); } else if (e.getKeyCode() == KeyEvent.VK_UP) { DefaultMutableTreeNode prev = (DefaultMutableTreeNode) BasicTreeUI.this.getPreviousVisibleNode(last);  if (prev != null) BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, new TreePath(prev.getPath())); } else if (e.getKeyCode() == KeyEvent.VK_LEFT) { TreePath path = new TreePath(last.getPath());  if (!last.isLeaf() && BasicTreeUI.this.tree.isExpanded(path)) { BasicTreeUI.this.tree.collapsePath(path); BasicTreeUI.this.tree.fireTreeCollapsed(path); } } else if (e.getKeyCode() == KeyEvent.VK_RIGHT) { TreePath path = new TreePath(last.getPath());  if (!last.isLeaf() && BasicTreeUI.this.tree.isCollapsed(path)) { BasicTreeUI.this.tree.expandPath(path); BasicTreeUI.this.tree.fireTreeExpanded(path); } } }
		public void keyPressed(KeyEvent e)		{		}