I am trying to display this site: http://ift.tt/2ynOWpX into my WebView (which is in a JFXPanel). However, it showing a blank screen. I tried several different pages and they all works fine to me.
Searching around suggest that it is a certificate issue. However I tried to fix it using this: JavaFX WebView can't load certain sites and it still does not work.
This is also what I am getting when listening for an error event:
ReadOnlyObjectProperty [bean: javafx.scene.web.WebEngine$LoadWorker@36ecd1f, name: exception, value: null]
Code:
Platform.runLater(() -> {
WebView webView = new WebView();
webPanel.setScene(new Scene(webView));
webView.setZoom(1.6);
webView.getEngine().load("http://ift.tt/2ynOWpX");
webView.getEngine().getLoadWorker().stateProperty()
.addListener((ov, oldState, newState) -> {
System.err.println(webView.getEngine().getLoadWorker()
.exceptionProperty());
});
});
Additionally, the website takes Firefox, Edge, Chrome, and Edge a bit of time to load so I don't know if it has anything to do with WebView.
Aucun commentaire:
Enregistrer un commentaire