private static String getDebugTitleForWindow(Window window, String defaultTitle) {
		if (window instanceof Frame) {
			return "Frame: '" + ((Frame) window).getTitle() + "'";
		}
		else if (window instanceof Dialog) {
			return "Dialog: '" + ((Dialog) window).getTitle() + "'";
		}
		return "Non-Frame/Dialog window: " + defaultTitle;
	}
A convenience method to close all of the windows and frames that the current Java
windowing environment knows about
Ghidra/Framework/Docking/src/main/java/docking/test/AbstractDockingTest.java