code: private void organizeContent()
      {
          table = new TableBox(el, g, ctx);
          table.adoptParent(this);
          table.setStyle(style);
          
          for (Iterator<Box> it = nested.iterator(); it.hasNext(); )
          {
              Box box = it.next();
              if (box instanceof TableCaptionBox)
              {
                  caption = (TableCaptionBox) box;
              }
              else if (box instanceof BlockBox && ((BlockBox) box).isPositioned())
              {
                  //positioned boxes are ignored
              }
              else //other elements belong to the table itself
              {
                  table.addSubBox(box);
                  box.setContainingBlockBox(table);
                  box.setParent(table);
                  it.remove();
                  endChild--;
              }
          }
          
          addSubBox(table);
      }
docs: Goes through the list of child boxes and organizes them into captions, header,
  footer, etc.