ScriptManager manager = new DefaultScriptManager();
print
in Javascript) encountered in the scripts will be shown on the command-line. it is possible to specify a logger to log the result of these instructions on a Swing componentmanager.setActive(true);Note that the "onload" event will be sent for all windows element. This event will be sent for all XUL document windows when the ScriptManager is activated.
public class MyFrame extends JFrame { public MyFrame() { ScriptManager manager = new DefaultScriptManager(); manager.addXULScript(<the XUL script file>); manager.install(this); manager.setActive(true); } public static void main(String args) { MyFrame frame = new MyFrame(); frame.setVisible(true); } }
Copyright 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence