Use Alt+F4 to close the window in Windows. On the other hand, this works perfectly: primaryStage. You can close the application using the Close menu option in the window title bar. Some of the provided answers did not work for me (javaw.exe still running after closing the window) or, eclipse showed an exception after the application was closed. You can have all these information on the javadoc page of Application : Solution 2 If you want to stop the application before that, you can call Platform.exit(), for example in your onCloseRequest call. At this moment, the stop() method of your Application class is called, so you don't need an equivalent to setDefaultCloseOperation() It starts creating a new JavaFX Application for you. If you want to create a JavaFX application in an IntelliJ project. Step 14 In the New Project wizard, select JavaFX and click on Next. If this method is called after the Application start method is called, then the JavaFX launcher will call the. The application automatically stops when the last Stage is closed. NOTE: The welcome window is only shown when you close all projects in IntelliJ IDEA. Causes the JavaFX application to terminate.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |