import javax.swing.JFrame; import javax.swing.SwingUtilities; import org.xhtmlrenderer.simple.XHTMLPanel; import org.xhtmlrenderer.util.XMLUtil; public class QuotingExample extends JFrame { //currently we cannot display different quotes based on depth private static final String DOCUMENT = "\n" + " \n" + " \n" + " \n" + " \n" + "
\n" + "

This is just a test of the emergency quoting system.

\n" + "

This is only a test.

\n" + "

Thank you for your cooperation during this test.

\n" + "
\n" + " \n" + "\n"; protected void frameInit() { super.frameInit(); setTitle("CSS Quoting Example"); setDefaultCloseOperation(EXIT_ON_CLOSE); XHTMLPanel xr = new XHTMLPanel(); try { xr.setDocument(XMLUtil.documentFromString(DOCUMENT)); } catch (Exception e) { throw new ExceptionInInitializerError(e); } add(xr); setSize(500, 300); } /** * @param args */ public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new QuotingExample().setVisible(true); } }); } }