private void createSearchInputField() {
		searchInputField = new GhidraComboBox<>() {
			@Override
			public void setSelectedItem(Object obj) {
				if (obj instanceof String) {
					// this can happen when a user types a string and presses enter
					// our data model is ByteMatcher, not strings
					return;
				}
				ByteMatcher matcher = (ByteMatcher) obj;
				model.setSettings(matcher.getSettings());
				super.setSelectedItem(obj);
			}
		};
		updateCombo();
		searchInputField.setAutoCompleteEnabled(false); // this interferes with validation
		searchInputField.setEditable(true);
		searchInputField.setToolTipText(model.getSearchFormat().getToolTip());
		searchInputField.setDocument(new RestrictedInputDocument());
		searchInputField.addActionListener(ev -> search());
		JTextField searchTextField = searchInputField.getTextField();

		// add escape key listener to dismiss any error popup windows
		searchTextField.addKeyListener(new KeyAdapter() {
			@Override
			public void keyPressed(java.awt.event.KeyEvent e) {
				if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
					clearInputError();
					e.consume();
				}
			}
		});

		// add focus lost listener to dismiss any error popup windows
		searchTextField.addFocusListener(new FocusAdapter() {
			@Override
			public void focusLost(FocusEvent e) {
				clearInputError();
			}
		});
		searchInputField.setRenderer(new SearchHistoryRenderer());
	}
Internal panel of the memory search window that manages the controls for the search feature. This
panel can be added or removed via a toolbar action. This panel is showing by default.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/gui/MemorySearchControlPanel.java