code: private static List<java.awt.Component> findComponents(java.awt.Container container,
                                                             Class<? extends java.awt.Component> componentClass) {
          List<java.awt.Component> list = new ArrayList<java.awt.Component>();
          for (java.awt.Component component : container.getComponents()) {
              if (component.isVisible() && componentClass.isAssignableFrom(component.getClass())) {
                  list.add(component);
              }
              if (component instanceof java.awt.Container) {
                  List<java.awt.Component> children = findComponents((java.awt.Container) component,
                                                                     componentClass);
                  list.addAll(children);
              }
          }
          return list;
      }
docs: Returns a list of all visible components which are instances of the given class. If one needs
  a find that returns an invisible component should add a parameter here. But the default
  behavior must be returning only visible components as it is the most common operation and
  required for compatibility with scripts converted from jfcunit. see #15790.
  
  @param container
  @param componentClass
  @return