private static String printComp(Component printComponent) {
		if (printComponent == null) {
			return null;
		}

		if (printComponent instanceof JFrame) {
			JFrame frame = (JFrame) printComponent;
			return "Window (" + frame.getTitle() + "): " + System.identityHashCode(frame);
		}
		else if (printComponent instanceof DockingDialog) {
			DockingDialog dockingDialog = (DockingDialog) printComponent;
			return "DockingDialog: " + dockingDialog.getTitle() + ": " +
				System.identityHashCode(printComponent);
		}
		else if (printComponent instanceof JButton) {
			return "JButton: " + ((JButton) printComponent).getText() + ": " +
				System.identityHashCode(printComponent);
		}

		String name = "";
		String componentName = printComponent.getName();
		if (componentName != null) {
			name = " - '" + componentName + "' ";
		}

		return printComponent.getClass().getName() + name + ": " +
			System.identityHashCode(printComponent);
	}
Prints to standard error the current focus information (active window, 
focused component, etc.).
Ghidra/Framework/Docking/src/main/java/docking/action/ShowFocusInfoAction.java