Reputation: 1001
In my application, I use a dialog form:
UtilisateursDialog dialog = new UtilisateursDialog(this,true);
presenter.setUtilisateurActif(dialog.showDialog());
Where UtilisateursDialog is a swing.JDialog.
When the dialog is visible, I noticed that it is impossible to exit the application. In MacOS, a click on application/quit or option+Q do nothing.
Is there a way to make the user able to exit when the dialog is visible?
Upvotes: 2
Views: 189
Reputation: 16354
If you don't need the dialog to be modal, do presenter.setModal(false)
before showing it and the menubar will become functional again.
Upvotes: 2
Reputation: 12092
Give a button in dialog with System.exit(0);
in its action performed,Terminates the currently running Java Virtual Machine. :)
Upvotes: 2