return (HTMLDocument) e.getDocument();
Document d = e.getDocument(); if (d instanceof HTMLDocument) return (HTMLDocument) d; throw new IllegalArgumentException("Document is not a HTMLDocument.");
      protected HTMLDocument getHTMLDocument(JEditorPane e)      {        return (HTMLDocument) e.getDocument();      }