private void build() {
		addWorkPanel(buildWorkPanel());
		createButton = new JButton("Create");
		createButton.setName("Create");
		createButton.getAccessibleContext().setAccessibleName("Create");

		createButton.addActionListener(e -> {
			if (isSingleStringMode()) {
				createStringsAndClose();
			}
			else {
				createStrings();
			}
		});
		addButton(createButton);

		addCancelButton();
		cancelButton.setText("Dismiss");
		setDefaultButton(createButton);
	}
For test/screen shot use

@return button
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/EncodedStringsDialog.java