Our maven/Netbeans platform application uses a custom image on startup, by replacing
Nbm-branding > core.jar > org.netbeans.core.startup > splash.gif
I tried making it an animated .gif, but only the first frame is displayed.
How would one possibly go about implementing an animated splash screen, maybe by running some JavaFX window animations?
I’ve seen another other SO question, but it wasn’t really answered – please notice I’m asking about how to integrate a custom splash screen with my Netbeans Platform application, and not how to actually build it.
Surprisingly enough, I found out how to plug in a custom splash screen based on this post about user authentication and authorization.
Basically, one needs to write another start-up class, instead of the platform’s default:
In that class, one can create a JavaFX stage, embed it into a
JWindow, and show it:Other things to remember are:
Suppress the original NetBeans splash screen by running your app with the
--nosplashparameter.Call your custom initialization class by running your app with the
-J-Dnetbeans.mainclass=com.package.splash.CustomStartupparameterAs the link suggests this custom class has to be on the platform’s initialization classpath, meaning inside the
platform/corefolder.