Example usage for javax.swing.text.html HTMLDocument insertBeforeEnd

List of usage examples for javax.swing.text.html HTMLDocument insertBeforeEnd

Introduction

In this page you can find the example usage for javax.swing.text.html HTMLDocument insertBeforeEnd.

Prototype

public void insertBeforeEnd(Element elem, String htmlText) throws BadLocationException, IOException 

Source Link

Document

Inserts the HTML specified as a string at the end of the element.

Usage

From source file:org.languagetool.gui.ResultAreaHelper.java

private void appendMain(String html) {
    HTMLDocument d = (HTMLDocument) statusPane.getDocument();
    Element e = d.getElement(MAIN);
    try {/*ww  w.  j  a  v a  2 s .  c o m*/
        d.insertBeforeEnd(e, html);
    } catch (BadLocationException ex) {
        Tools.showError(ex);
    } catch (IOException ex) {
        Tools.showError(ex);
    }
}