return view;
HTMLRootView rootView = new HTMLRootView(c, view, kit, doc); return rootView;
  public static View createHTMLView(JComponent c, String html)  {    // TODO: This might be wrong. Lets see if it turns out good when    // the javax.swing.text.html package is in a good shape.    HTMLDocument doc = new HTMLDocument();    HTMLEditorKit kit = new HTMLEditorKit();    StringReader reader = new StringReader(html);    try      {        kit.read(reader, doc, 0);      }    catch (IOException ex)      {        AssertionError err = new AssertionError("unexpected IOException");        err.initCause(ex);        throw err;      }    catch (BadLocationException ex)      {        AssertionError err =          new AssertionError("unexpected BadLocationException");        err.initCause(ex);        throw err;      }    ViewFactory vf = kit.getViewFactory();    Element root = doc.getDefaultRootElement();    View view = vf.create(root);    return view;  }