I am running my JavaFX application like this:
public class MainEntry {
public static void main(String[] args) {
Controller controller = new Controller();
Application.launch(MainStage.class);
}
}
MainStage
class extends Appication
. Application.launch
starts my JavaFX window in a special FX-thread, but in my main method I don't even have an instance of my MainStage
class.
How to pass non-String parameter (controller in my case) to MainStage
instance? Is it a flawed design?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…