private void createUserField() {

			userField = new GFormattedTextField(FORMATTER_FACTORY, "");
			userField.setName("User");
			userField.setText("");
			userField.setDefaultValue("");
			userField.setEditable(true);

			userField.setInputVerifier(new InputVerifier() {
				@Override
				public boolean verify(JComponent input) {
					setStatus("");
					String username = userField.getText().trim();
					if (username.length() == 0) {
						setStatus("");
						return true;
					}
					Matcher userMatch = USERNAME_PATTERN.matcher(username);
					if (!userMatch.matches()) {
						setStatus("Unsupported database user name");
						return false;
					}
					return true;
				}

				@Override
				public boolean shouldYieldFocus(JComponent source, JComponent target) {
					return true;
				}
			});

			userField.addKeyListener(new KeyAdapter() {
				@Override
				public void keyPressed(KeyEvent e) {
					if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
						e.consume();
						userField.setText("");
						userField.setDefaultValue("");
						userField.setIsError(false);
					}
					checkForValidDialog();
				}
			});

			userField.addTextEntryStatusListener(f -> checkForValidDialog());
		}
Dialog for entering new BSim database server definition
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/dialog/CreateBsimServerInfoDialog.java