private void build(String prompt) {

		GHtmlLabel promptLabel = new GHtmlLabel(prompt);
		promptLabel.getAccessibleContext().setAccessibleName(prompt);
		filePathTextField = new JTextField(file != null ? file.getPath() : null, 40);
		filePathTextField.getAccessibleContext().setAccessibleName("File Path");
		filePathTextField.getDocument().addDocumentListener(new DocumentListener() {
			@Override
			public void removeUpdate(DocumentEvent e) {
				updateButtonEnablement();
			}

			@Override
			public void insertUpdate(DocumentEvent e) {
				updateButtonEnablement();
			}

			@Override
			public void changedUpdate(DocumentEvent e) {
				updateButtonEnablement();
			}
		});
		JButton browseButton = new BrowseButton();
		browseButton.addActionListener(e -> browse());
		browseButton.getAccessibleContext().setAccessibleName("Browse");
		JPanel textFieldWithButtonPanel = new JPanel(new BorderLayout());
		textFieldWithButtonPanel.getAccessibleContext()
				.setAccessibleName("File Path Text Field and Browse Button");
		textFieldWithButtonPanel.add(filePathTextField, BorderLayout.CENTER);
		textFieldWithButtonPanel.add(browseButton, BorderLayout.EAST);

		JPanel mainPanel = new JPanel(new PairLayout());
		mainPanel.add(promptLabel);
		mainPanel.add(textFieldWithButtonPanel);
		mainPanel.getAccessibleContext().setAccessibleName("File Prompt");
		Dimension size = mainPanel.getPreferredSize();
		size.width = Math.max(size.width, 500);
		mainPanel.setPreferredSize(size);
		mainPanel.setMinimumSize(size);
		JPanel newMain = new JPanel(new BorderLayout());
		newMain.add(mainPanel, BorderLayout.CENTER);
		newMain.getAccessibleContext().setAccessibleName("File Prompt");
		addWorkPanel(newMain);
		addOKButton();
		addCancelButton();
	}
Prompts the user to entry the path to a file and/or directory,
or to pick it using a browser dialog.

@param title the dialog title
@param prompt HTML enabled prompt
@param chooseButtonText text of the choose button in the browser dialog
@param directory the initial directory of the browser dialog
@param initialFileValue the initial value to pre-populate the input field with
@param chooserMode {@link GhidraFileChooserMode} of the browser dialog
@param fileFilters optional {@link GhidraFileFilter filters}
@return the {@link File} the user entered / picked, or null if canceled
Ghidra/Features/PDB/src/main/java/pdb/symbolserver/ui/FilePromptDialog.java