I have a webView component on a tab in my JavaFX application which I am trying to load an locally stored HTML page into:
WebView browser = new WebView();
WebEngine webEngine = browser.getEngine();
webEngine.load("/webView/main.html");
My html document is (possibly incorrectly) stored in the following location:
where com.cds.gui contains the class where I am attempting to load the file. If I print out webEngine.getDocument()
I get null
- i.e. the document isn't getting loaded.
Please let me know where I'm going wrong! Thanks.