code: private static void walkComponentTree(Component c, Consumer<Component> visitor) {
          visitor.accept(c);
          if (c instanceof HasComponents) {
              for (Component child : ((HasComponents) c)) {
                  walkComponentTree(child, visitor);
              }
          }
      }
docs: recursively walk the Component true