BranchElement paragraph = new BranchElement(section, null);
BranchElement paragraph = (BranchElement) createBranchElement(section, null);
  protected AbstractDocument.AbstractElement createDefaultRoot()  {    Element[] tmp;    SectionElement section = new SectionElement();    BranchElement paragraph = new BranchElement(section, null);    tmp = new Element[1];    tmp[0] = paragraph;    section.replace(0, 0, tmp);    LeafElement leaf = new LeafElement(paragraph, null, 0, 1);    tmp = new Element[1];    tmp[0] = leaf;    paragraph.replace(0, 0, tmp);    return section;  }