Hi Lingocoder,
You have been a great help to me, I am grateful to you and it is with pleasure that I can help you in return.
In terms of providing you with a project with the configuration of this moment I’m afraid it will be difficult but I remember enough of the outline to be able to describe them:
Elipse version 2019-09 (4.13) on Mac.
It seems to me that at this point the JVM was integrating JavaFX. Since I have a version without JavaFX:
openjdk version “11.0.1” 2018-10-16
But without JavaFX integrated into the JVM I had to go through the Gradle plugin “‘org.openjfx.javafxplugin’ version ‘0.0.8’” :
javafx {
version = “11”
modules = [ ‘javafx.controls’, ‘javafx.fxml’ ]
}
So much for the configuration. The first step is to launch a JavaFX window “Hello world”.
Then I needed to replace the system-provided javafx.stage.Stage instance in the “start ()” method of the javafx.application.Application (@Override public void start (final Stage PrimaryStage) {… .) by an instance javafx.stage.Stage to me.
For that I have to go through the static method (public static void setPrimary (Stage Stage, boolean primary)) of the com.sun.javafx.stage.StageHelper class. And this is where access rights issues manifest themselves. How does the compiler know how to see this StageHelper class?
public class MainApp extends Application {
…
@Override
public void start(final Stage primaryStage) {
//‘mainWin’ is my own instance of primaryStage.
mainWin = new MainWindow();
StageHelper.setPrimary(mainWin, true);
…
I have to leave this morning but if this description is not enough I can make you a mini-project but in my current configuration. At least you will have the sources.
best regards
----- Mail original -----