if (doc instanceof StyledDocument) { StyledDocument sdoc = (StyledDocument) doc; sdoc.setCharacterAttributes(start, end - start, s, true); }
    public void setAttributes(int start, int end, AttributeSet s)      throws NotImplementedException    {      // TODO    }