private JPanel createDirectoryPanel(DocumentListener listener) {
		JPanel panel = new JPanel(new BorderLayout());
		directoryField = new JTextField(10);
		directoryField.getDocument().addDocumentListener(listener);
		directoryField.setName("Project Directory");

		File projectDirectory = null;
		String projectDirPath = Preferences.getProperty(Preferences.LAST_NEW_PROJECT_DIRECTORY);
		if (projectDirPath != null) {
			// if it exists, use last directory where project was created
			projectDirectory = new File(projectDirPath);
			if (!projectDirectory.isDirectory()) {
				projectDirectory = null;
			}
		}
		if (projectDirectory == null) {
			// otherwise, use last project directory or default
			projectDirectory = new File(GenericRunInfo.getProjectsDirPath());
		}
		projectDirPath = projectDirectory.getAbsolutePath();
		directoryField.setText(projectDirPath);
		directoryField.setCaretPosition(projectDirPath.length() - 1);

		browseButton = new BrowseButton();
		browseButton.addActionListener(e -> displayFileChooser());
		JPanel buttonPanel = new JPanel(new BorderLayout());
		buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
		buttonPanel.add(browseButton, BorderLayout.CENTER);

		panel.add(directoryField, BorderLayout.CENTER);
		panel.add(buttonPanel, BorderLayout.EAST);
		return panel;
	}
Construct a new panel.
@param statusChangedCallback callback
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/wizard/project/SelectProjectPanel.java