public void programClosed(Program p) {
		if (program == p) {
			close();
		}
	}
For test/screen shot use

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