Code example for JList

Methods: clearSelection

0
	} 
 
	private void hideOptionsPopup() { 
		if (isOptionsPopupVisible()) { 
			popup.setVisible(false);
			list.clearSelection();
		} 
	} 
 
	private void updateText() { 
		T option = (T) list.getSelectedValue();
		String text = option == null ? userInput : completionProvider
				.toString(option);
		Document d = textField.getDocument();
		d.removeDocumentListener(documentListener);
		textField.setText(text);
		d.addDocumentListener(documentListener);
	} 
 
	private void handleSpecialKeys(KeyEvent keyEvent) {
Contextual code suggestions in your IDE  Get Codota for Java