Examples of executeJavascriptWithResult()


Examples of chrriis.dj.nativeswing.swtimpl.components.JWebBrowser.executeJavascriptWithResult()

    // Create an panel with a screen capture button.
    JPanel southPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 4, 4));
    JButton captureButton = new JButton("Full-page capture");
    captureButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        String result = (String)webBrowser.executeJavascriptWithResult(
            "var width = 0;" + LS +
            "var height = 0;" + LS +
            "if(document.documentElement) {" + LS +
            "  width = Math.max(width, document.documentElement.scrollWidth);" + LS +
            "  height = Math.max(height, document.documentElement.scrollHeight);" + LS +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.