I want to display local .html with .css and .js by WebView. Here is my code:
WebView webView = new WebView();
WebEngine webEngine = webView.getEngine();
webEngine.load(Main.class.getResource("/dashboard/index.html").toExternalForm());
Stage webViewStage = new Stage();
webViewStage.setScene(new Scene(new StackPane(webView)));
webViewStage.show();
And that folder structure where .html located:
But my local web page loaded like this:
instead of this:
why?