I am working on a project and have embedded a JavaFx Browser in a java application. Now, I would like to display some contents in the Browser.
I wanted to know that is there a way to display the contents through a string that contains HTML tags. I do not want to create a HTML file and the display the contents.
I was looking for something like JTextPane.
I could not investigate that JavaFX Browser Netbeans Module in depth. But if it is using a JavaFX WebView control internally then you can load String value containing HTML page (or tag) via WebView's WebEngine. See the WebEngine API for different content loadings. That Netbeans Module should have some interface API allowing this.
The method you want is webView.getEngine().loadContent(htmlString)
You have to change the < to <, followed by a semicolon, and change the > to >, followed by a semicolon.
Just like I did to type this answer.