code: public void add(int index, Object o) {
      	if (o == null) return;
          try {
              Element element = (Element) o;
              if (element.type() == Element.CHUNK) {
                  Chunk chunk = (Chunk) element;
                  if (!font.isStandardFont()) {
                      chunk.setFont(font.difference(chunk.getFont()));
                  }
                  if (hyphenation != null && chunk.getHyphenation() == null && !chunk.isEmpty()) {
                  	chunk.setHyphenation(hyphenation);
                  }
                  super.add(index, chunk);
              }
              else if (element.type() == Element.PHRASE ||
              element.type() == Element.ANCHOR ||
              element.type() == Element.ANNOTATION ||
              element.type() == Element.TABLE || // line added by David Freels
              element.type() == Element.YMARK || 
              element.type() == Element.MARKED) {
                  super.add(index, element);
              }
              else {
                  throw new ClassCastException(String.valueOf(element.type()));
              }
          }
          catch(ClassCastException cce) {
              throw new ClassCastException("Insertion of illegal Element: " + cce.getMessage());
          }
      }
docs: Adds a <CODE>Chunk</CODE>, an <CODE>Anchor</CODE> or another <CODE>Phrase</CODE>
  to this <CODE>Phrase</CODE>.
  
  @param	index	index at which the specified element is to be inserted
  @param	o   	an object of type <CODE>Chunk</CODE>, <CODE>Anchor</CODE> or <CODE>Phrase</CODE>
  @throws	ClassCastException	when you try to add something that isn't a <CODE>Chunk</CODE>, <CODE>Anchor</CODE> or <CODE>Phrase</CODE>