if(selected > 0) words.setSelectedIndex(selected  - 1);
if(selected == 0) selected = words.getModel().getSize() - 1; else selected = selected - 1;  words.setSelectedIndex(selected); words.ensureIndexIsVisible(selected);
		public void keyPressed(KeyEvent evt)		{			switch(evt.getKeyCode())			{			case KeyEvent.VK_ENTER:				insertSelected();				evt.consume();				break;			case KeyEvent.VK_ESCAPE:				dispose();				evt.consume();				break;			case KeyEvent.VK_UP:				int selected = words.getSelectedIndex();				if(selected > 0)					words.setSelectedIndex(selected  - 1);				evt.consume();				break;			case KeyEvent.VK_DOWN:				selected = words.getSelectedIndex();				if(selected < words.getModel().getSize() - 1)					words.setSelectedIndex(selected  + 1);				evt.consume();				break;			}		}