platform.runlater(new runnable() { @override public void run() { wv = new webview(); final webengine engine = wv.getengine(); fxpanel.setscene(new scene(wv)); engine.setjavascriptenabled(true); engine.load(url); }
and when close frame when webview open can see them running in background , try close in 1 public void class not close how can it.
public static void closeframe() { platform.setimplicitexit(false); if (classname != null) { classname.frame.dispose(); platform.runlater(() -> { wv = new webview(); classname.wv.getengine().reload(); classname.wv = null; classname.frame = null; });
exit platform in stop method this:
public class main extends application { //entry point application public static void main(string[] args) { launch(args); } @override public void start(stage primarystage) throws exception { parent authscene = (parent) fxmlloader.load(getclass().getresource("/view/auth.fxml")); scene scene = new scene(authscene); primarystage.setscene(scene); primarystage.setresizable(false); primarystage.settitle("green project : login form"); primarystage.show(); } @override public void stop() { platform.exit(); } }
Comments
Post a Comment