All Downloads are FREE. Search and download functionalities are using the official Maven repository.

erer.flying-saucer-examples.9.9.4.source-code.QuotingExample Maven / Gradle / Ivy

There is a newer version: 9.11.2
Show newest version
import org.xhtmlrenderer.simple.XHTMLPanel;
import org.xhtmlrenderer.util.XMLUtil;

import javax.swing.*;

import static javax.swing.SwingUtilities.invokeLater;


public class QuotingExample extends JFrame {
    //currently we cannot display different quotes based on depth
    private static final String DOCUMENT =
            """
                    
                      
                        
                      
                      
                        

This is just a test of the emergency quoting system.

This is only a test.

Thank you for your cooperation during this test.

"""; 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); } public static void main(String[] args) { invokeLater(() -> new QuotingExample().setVisible(true)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy