Vector visible = new Vector(); for (int i = 0; i < children.length; i++) if (children[i].isVisible()) visible.add(children[i]); return (Component[]) visible.toArray(new Container[visible.size()]);
Object o = visibleChildrenCache.get(children); VisibleComponentList visibleChildren = null; if (o == null) { visibleChildren = new VisibleComponentList(children); visibleChildrenCache.put(children, visibleChildren); } else visibleChildren = (VisibleComponentList) o;  return visibleChildren;
  public static Component[] getVisibleChildren(Container c)  {    Component[] children = c.getComponents();    Vector visible = new Vector();    for (int i = 0; i < children.length; i++)      if (children[i].isVisible())        visible.add(children[i]);    return (Component[]) visible.toArray(new Container[visible.size()]);  }