private GFormattedTextField buildPathTextField() {
		DefaultFormatter formatter = new DefaultFormatter();
		formatter.setOverwriteMode(false);
		DefaultFormatterFactory factory = new DefaultFormatterFactory(formatter);
		GFormattedTextField textField = new GFormattedTextField(factory, "") {
			@Override
			public void setText(String t) {
				super.setText(t);
				setDefaultValue(t);
			}
		};
		textField.setName("Path");

		textField.addFocusListener(new FocusAdapter() {
			@Override
			public void focusGained(FocusEvent e) {
				lastInputFocus = textField;
			}
		});

		DockingUtils.installUndoRedo(textField);

		// have the Escape key clear any edits to the field
		KeyStroke escapeKs = KeyBindingUtils.parseKeyStroke("Escape");
		Action escapeAction = new AbstractAction("Reset Path") {
			@Override
			public void actionPerformed(ActionEvent e) {

				if (textField.isChanged()) {
					textField.reset();
				}
				else {
					// When not edited, pass the event up to the chooser so the behavior works as
					// it does elsewhere in the dialog.
					escapeCallback();
				}
			}
		};

		// remove the table's escape key binding and then add our own
		KeyBindingUtils.clearKeyBinding(textField, escapeKs);
		KeyBindingUtils.registerAction(textField, escapeKs, escapeAction,
			JComponent.WHEN_FOCUSED);

		// update Enter to allow the user to pick the selected language
		KeyStroke enterKs = KeyBindingUtils.parseKeyStroke("Enter");
		Action enterAction = new AbstractAction("Choose File") {
			@Override
			public void actionPerformed(ActionEvent e) {

				if (!textField.isChanged()) {
					// When not edited, pass the event up to the chooser so the behavior works as
					// it does elsewhere in the dialog.
					enterCallback();
					return;
				}

				if (!textField.isValid()) {
					return;
				}

				String text = textField.getText();
				File f = new File(text);
				if (f.isFile()) {
					setSelectedFile(f);
				}
				else {
					updateDirOnly(f, true);
				}
			}
		};

		// remove the table's enter key binding and then add our own
		KeyBindingUtils.clearKeyBinding(textField, enterKs);
		KeyBindingUtils.registerAction(textField, enterKs, enterAction,
			JComponent.WHEN_FOCUSED);

		// an input verifier that returns true if the path is an existing file or directory
		InputVerifier inputVerifier = new InputVerifier() {
			@Override
			public boolean verify(JComponent input) {
				String text = textField.getText();
				File f = new File(text);
				if (isSpecialDirectory(f)) {
					return true;
				}
				return f.isFile() || f.isDirectory();
			}
		};
		textField.setInputVerifier(inputVerifier);

		return textField;
	}
Constructs a new ghidra file chooser

@param model the file chooser model
@param parent the parent component
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java