[BLUEJ-1128] BlueJ run-on-FX setting causes error if user doesn't run an FX application
We now have a run-on-thread setting per project in BlueJ, one of which is JavaFX thread. This option presumes that the user will begin executing by running a JavaFX application (which also resets VM first), after which they want all their code on the FX thread. However, if they don't do this then they will get an error complaining that the FX toolkit is uninitialised.
I think what we should do instead is simply initialise the JavaFX toolkit (e.g. with a "new JFXPanel()") before running an FX method. If they already ran an FX application, it's a harmless no-op. If they didn't already run an FX app, it stops us giving this unhelpful error.
Issue metadata
- Issue type: Bug
- Priority: High
- Fix versions: 4.1.3