[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Telling JEditorPane that its test is HTML



I'm creating some help in a JEditorPane in HTML format.



  private void populateHelp() {
    help.append("Content-Type: text/html\n\n");
    help.append("<HTML><HEAD></HEAD><BODY>\n");
    help.append("<H1>Console Connection Help</H1>\n");
    help.append("<HR>\n");
    help.append("</BODY></HTML>\n");

    // Add it in
    jEditorPane1.setEditable(true);
    jEditorPane1.setText(help.toString());

  }


When I display I see the real HTML code an not a rendered look.  All the
code I've seen is populating from URL.  How can I tell the jEditorPane1
that this String class in setText() is pure HTML?

Thanks,
Chris