java - how to open pop up in new window using javafx web view -
i trying implement popup handler in javafx webview generating popup , adding on same fxpanel want display onto new window . using following code.
try { webview webview,smallview final group group= new group(); scene scene= new scene(group); fxpanel.setscene(scene); webview = new webview (); group.getchildren().add(webview); eng= webview.getengine(); string url ="http://www.timetrim.in/webchatserver2/default.aspx"; eng.load(url); smallview = new webview(); smallview.setprefsize(400, 200); eng.setcreatepopuphandler( new callback<popupfeatures, webengine>() { @override public webengine call(popupfeatures config) { smallview.setfontscale(0.8); if (!group.getchildren().contains(smallview)) { group.getchildren().add(smallview); } return smallview.getengine(); } }); } catch(exception ex){ex.printstacktrace();}
Comments
Post a Comment