JFrame
which implements the Script logger interfaceJComponent
which implements the Script logger interfacescriptHelperSwing.jar
file in your Classpath.
ScriptWrapper<Script> wrapper = new GroovyScriptWrapper() { } ... DefaultSwingScriptLogger(); logger = new DefaultSwingScriptLogger(); wrapper.setScriptLogger(logger);
ScriptWrapper<Script> wrapper = new GroovyScriptWrapper() { } ... SwingExceptionListener listener = new SwingExceptionListener(); wrapper.addExceptionListener(listener);Then the first exception encountered during the compilation or execution of the script will popup the following window, for example:
SwingExceptionListener
so that all exceptions will trigger the apparition of the error window by:listener.resetWrapperOnDispose(true);In this case, the window will show a "dismiss" option for quitting the widnwo to allow to reset to the default behavior:
Copyright 2019-2020 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence