I'm trying to create a login window with JavaFX 2 and stop execution until the user has not logged. I want something like the below:
showLoginDialog();
showMainWindow();
showLoginDialog
is responsible for creating a new stage and set its parent to be the main window. It sets the stage to be modal, I tried both WINDOW_MODAL
and APPLICATION_MODAL
, but as soon as the login window is showed, the showMainWindow()
line is called as well.
Is it possible to stop code running until the close()
of the login stage is called, or something similar? Are there any tutorials showing how this can be achieved?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…