We are trying to create a desktop application which opens url with html5 canvas. We implemented it using Java 8 JavaFX. But we experiencing bad response in rendering of sketches.
This working fine in Chrome browser. Is it possible to embed chrome browser in JavaFx application?
The recommended way to embed a JavaFX application into a web page or launch it from inside a web browser is to use the Deployment Toolkit library. The Deployment Toolkit provides a JavaScript API to simplify web deployment of JavaFX applications and improve the end user experience with getting the application to start.
WebView is a Node that manages a WebEngine and displays its content. The associated WebEngine is created automatically at construction time and cannot be changed afterwards. WebView handles mouse and some keyboard events, and manages scrolling automatically, so there's no need to put it into a ScrollPane .
It supports Cascading Style Sheets (CSS), JavaScript, Document Object Model (DOM), and HTML5. The embedded browser enables you to perform the following tasks in your JavaFX applications: Render HTML content from local and remote URLs.
A JavaFX application can communicate with the web page in which it is embedded by using a JavaScript engine. The host web page can also communicate to embedded JavaFX applications using JavaScript.
Is it possible to change WebView of JavaFX to Chrome
No.
Is it possible to embed chrome browser in JavaFx application?
Yes.
Try JCEF from the chromium embedded project instead of WebView.
For a commercial solution, JxBrowser advertises Chromium support for JavaFX applications.
I have not used either of JxBrowser or JCEF, so I have no further details or advice on how to use them or whether or not they would be fit for your purpose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With