简体   繁体   中英

JavaFX WebView doesn't load content

I'm trying to load a Google Maps page inside my JavaFX application using webView and webEngine. Somehow, it doesn't load anything and I don't know why. Could you please help?

@FXML WebView webView;
WebEngine webEngine;
webView = new WebView();
webEngine = webView.getEngine();
webEngine.load("https://maps.google.de");
@FXML WebView webView;
WebEngine webEngine;
webEngine = webView.getEngine();
webEngine.load("https://maps.google.de");

Removing webView = new WebView(); fixed it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM