private String getName(Component comp) {
		if (comp == null) {
			return null;
		}
		String name = comp.getName();
		StringBuilder buf = new StringBuilder(name == null ? "" : name);
		buf.append(" (");
		buf.append(comp.getClass().getSimpleName());
		buf.append(")");
		return buf.toString();
	}
Diagnostic dialog for display information about the components in a window and related focus
information.
Ghidra/Framework/Docking/src/main/java/ghidra/docking/util/ComponentInfoDialog.java