List of usage examples for javax.swing.text.html HTMLDocument setInnerHTML
public void setInnerHTML(Element elem, String htmlText) throws BadLocationException, IOException
From source file:org.languagetool.gui.ResultAreaHelper.java
private void setHeader(String txt) { HTMLDocument d = (HTMLDocument) statusPane.getDocument(); Element e = d.getElement(HEADER); try {//from w w w . jav a2 s .co m d.setInnerHTML(e, "<p class=\"grayed\">" + txt + "</p>"); } catch (BadLocationException ex) { Tools.showError(ex); } catch (IOException ex) { Tools.showError(ex); } }
From source file:org.languagetool.gui.ResultAreaHelper.java
private void setMain(String html) { HTMLDocument d = (HTMLDocument) statusPane.getDocument(); Element e = d.getElement(MAIN); try {//from w ww . ja v a2 s . c o m d.setInnerHTML(e, html); } catch (BadLocationException ex) { Tools.showError(ex); } catch (IOException ex) { Tools.showError(ex); } }