How do I use webview
when I use:
public void site(){
WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.load("http://mySite.com");
}
I have the error:
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at javafx.scene.web.WebEngine.<clinit>(WebEngine.java:315)
at javafx.scene.web.WebView.<init>(WebView.java:273)
I need to use within void
because it will be called on a actionlistener
of a button later.