I want to embed a dukescript app inside a Swing App so I think that I have to embed a panel to support JavaFX rendering.
final JFXPanel fxPanel = new JFXPanel();
Scene scene = createScene();
fxPanel.setScene(scene);
To be able to render Dukescript I think that I have to add a Webview so the alreasy existing JavaFX presenter (from html for java) can receive it an use it accordingly.
Group root = new Group();
final WebView browser = new WebView();
final WebEngine webEngine = browser.getEngine();
root.getChildren().add(browser);
And then to use it with Dukescript I think that I should add maven dependency for JavaFx presenters.
<dependency>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.boot.fx</artifactId>
<scope>runtime</scope>
</dependency>
So I think it the desired code should be something like that.
net.java.html.boot.fx.FXBrowsers presenter= new FXBrowsers();
presenter.load(browser ,
"index.html",
Runnable onPageLoad??);
Have you already tried it? Thank you in advance.