Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
At the moment the only way to start the JavaFX platform/toolkit/main-thread is to either have an Application instance around or to call into the internal API, PlatformImpl.start(Runnable). Providing an official API to start it would be very useful, as it would allow to gain fine-grained control of the JavaFX lifecycle. Having an Application instance around has drawbacks as, for example, Application.launch() will halt the thread it was invoked on. And calling the internal API isn't optimal for (hopefully) obvious reasons. For example applications could decide to launch JavaFX dynamically if needed, as it is with migrating from one UI toolkit to another the case. The exact use-case is framework development with a framework that does not necessary have one main window, but can have multiple (or none). Having an official way to launch JavaFX without resorting to "hammering Application into the concept" or using the internal API would be great.
|