hal hal - 5 months ago 24
Java Question

How to load locally stored page to WebView controll?

I have WebView control in my application.

private WebView webview = new WebView();

i use it like this


and it works well, but how do i use it to load locally stored page.
For example:



You can create the a URL to pass to the WebEngine from a File or Path

File file = ...
URL url = file.toURI().toURL();
Path path = ...
URL url = path.toUri().toURL();