private boolean shouldInclude(ComponentInfo info) {
		Component component = info.getComponent();
		if (!component.isFocusable()) {
			return false;
		}
		if (component instanceof JPanel) {
			if (info.getCycleRootIndex() == null) {
				return false;
			}
		}
		if (component instanceof GGlassPane) {
			return false;
		}
		if (component instanceof JRootPane) {
			return false;
		}
		if (component instanceof JViewport) {
			return false;
		}
		if (component instanceof JLayeredPane) {
			return false;
		}
		if (component instanceof JLabel) {
			return false;
		}
		if (component instanceof JMenu) {
			return false;
		}

		return true;
	}
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