Questions tagged [javafx-webengine]

WebEngine is a non-visual object capable of managing one Web page at a time. It loads Web pages, creates their document models, applies styles as necessary, and runs JavaScript on pages. It provides access to the document model of the current page, and enables two-way communication between a Java application and JavaScript code of the page.

264 questions
365
votes
3 answers

Google Maps & JavaFX: Display marker on the map after clicking JavaFX button

I have been trying to display a marker on the map when I click on a Button of my JavaFX application. So what happens is when I click on that button, I write the position in a JSON file, this file will be loaded in the html file that contains the…
Chandler Bing
  • 1,036
  • 2
  • 8
  • 14
20
votes
3 answers

JavaFX 8 WebEngine: How to get console.log() from javascript to System.out in java?

I'm using both JavaFX and the javascript engine inside JavaFX WebEngine to develop an application. I'd like to get feedback from javascript for debugging purposes. What happens to the console output inside the WebEngine? Is there any way I can…
user4159962
16
votes
1 answer

JavaFx view pdf in Popup without using JxBrowser Plugin

I am trying to develop a javafx webview browser. I have a website developed in PHP that I need to display through the javafx web browser. Popups browser window is generated using javascript window.load() function, and the content of pdf is is…
14
votes
3 answers

How do you cancel a webview loading a web site?

What I'm trying to implement is essentially the cancel button of a browser but using JavaFX's webview. This is the code I have so far: Worker loadWorker = webView.getEngine().getLoadWorker(); if (loadWorker != null) { Platform.runLater(()…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
14
votes
3 answers

How to call launch() more than once in java

How to call the launch() more than once in java i am given an exception as "ERROR IN MAIN:java.lang.IllegalStateException: Application launch must not be called more than once" I have create rest cleint in my java application when request comes it…
venu
  • 2,971
  • 6
  • 40
  • 59
12
votes
2 answers

JavaFX : Embedding a browser other than available webview with JavaFX

I am working on a JavaFX application which contains few html,css,JS files which are rendered by the internal webkit browser. Now, the problem is the CSS animations which we have are not getting rendered smoothly in the webkit browser provided by…
We are Borg
  • 5,117
  • 17
  • 102
  • 225
12
votes
3 answers

Is it possible to change WebView of JavaFX to Chrome

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…
Sangeeth
  • 614
  • 1
  • 5
  • 14
12
votes
3 answers

JavaFX - How to create SnapShot/Screenshot of (invisble) WebView

I want to create a SnapShot/Screenshot/Image from a WebView in JavaFX(8).This WebView does not need to be visible (in my case). My question: Is it possible (in any way), to create a Screenshot/Image from a WebView, when the WebView is not visible…
Ben
  • 3,378
  • 30
  • 46
10
votes
1 answer

set HTTP headers in WebEngine JavaFX

How to pass the HTTP Headers like "Accept-Language", "Accept", "Accept-Encoding" to WebEngine in JavaFX? i have tried the method as specified in Setting a cookie using JavaFX's WebEngine/WebView, but it doesn't work. is there any API that is being…
Arun
  • 111
  • 1
  • 4
7
votes
2 answers

Leaflet does not work in WebEngine after JavaFX 17

I have an application made with JavaFX 16 which contains a WebView used to show an interactive map using the Leaflet JS library. I have a problem when I try to transition to JavaFX 17, the interactive map does not work anymore (it cannot be moved…
7
votes
0 answers

Why is JavaFX WebEngine getLoadWorker looping?

I'm not very sure how to word this question but I'll try. My application runs commands against a website with a click of a button. The issue is during each loop the getLoadWorker increases by 1. In the load worker i set listeners. Here is how it…
Salim
  • 199
  • 3
  • 18
7
votes
2 answers

How to programatically use Basic Authentication in WebView - JavaFX

I'm developing a JavaFX application and I'm trying to use WebView to access a web application. This web application has Basic Authentication and I want to submit the credentials programatically (don't want to prompt the user for his credentials,…
7
votes
1 answer

JavaFX - Open Url in chrome browser

I have an Url that will work only under chrome browser. I opened an url in webview but it doesn't work in it. I got the following error. So I would like to open it in chrome browser. Is it possible? if yes, Please help me. Code WebView browser =…
naresh
  • 10,332
  • 25
  • 81
  • 124
6
votes
1 answer

after restore from minimize WebView become disabled in javafx

My problem is when I am restoring minimized javafx application from windows taskbar WebView become disabled. After resize stage it becomes enabled. Main java Code: public class Main extends Application { @Override public void start(Stage…
CTN
  • 335
  • 1
  • 18
6
votes
1 answer

How can I set a JavaFX WebView as big as the scene?

I have a JavaFX WebView which I want to have as big as the scene on start. If I could make it resize with the scene, this would be perfect. But right now I focus just on the initial size. @Override public void start(Stage stage) { try { …
Peter
  • 1,844
  • 2
  • 31
  • 55
1
2 3
17 18