I am trying to create a download progress bar that shows the progress of the download of a Jar file. I have 1 jar file that loads multiple others, so from within the main Jar file, I have callbacks that call back to the javascript of the HTML. I want to use these callbacks to update a html progress bar through javascript.
This is what I have so far:
When the javascript receives a callback from java, I print it to the console, and also change the text of the loading bar.
The status prints fine in the browser console, but the loading bar text is only updated after the Jar file has been downloaded (It only shows 100% and nothing in between) In other words,
It freezes completely until the downloads are all done.
I call back to Js using the following line of code at multiple places within my Java:
window.call("LoadingState", new Object[]{50,"Updater"});
And this is what the console receives:
However, nothing happens on the progress bar until the loading is completely done. Is there a way to get around this freeze?