I have a preloader for my application that handles the Application-specific initialization. Now I\'m trying to extend this so that the preloader also shows the p
Note: I haven't tested or executed the code; my answer is primarily based on looking at the code. I haven't worked on JavaFX but I can grasp the code since I've worked on Swing and JNLP before.
The first thing I notice, is that in Phase 2, the default JavaFX preloader handling the downloading of the application JARs is not showing.
This seems to be because of the PreloaderFX.start(stage)
method. The stage
passed as the method's argument remains empty because the method constructs a new Stage()
and adds children to it. If you add the child elements to the method's argument, it should display your custom preloader/progressbar during phase 2.
If the code still doesn't work as expected after this, I'd try debugging all the logic/code associated with the noLoadingProgress
flag. Try commenting all that out (essentially taking noLoadingProgress
out of the picture) and see if it fixes the issue.
Also, even though you've got this right in your code, see this answer - according to which all ProgressNotification
s are handled by the handleApplicationNotification
method.
Hope this helps!