JavaFX application still running after close

后端 未结 8 1155
长发绾君心
长发绾君心 2021-01-04 00:25

I\'m having problem to close my javaFX application, when I click the close button from my stage, my application disappears but if I look for it in my task manager my applica

相关标签:
8条回答
  • 2021-01-04 01:19

    I was able to fix this problem by calling com.sun.javafx.application.tkExit(). You can read more in my other answer here: https://stackoverflow.com/a/22997736/1768232 (these two questions really are duplicates).

    0 讨论(0)
  • 2021-01-04 01:20

    To imitate pressing 'x' one can do:

    stage.fireEvent(new WindowEvent(stage, WindowEvent.WINDOW_CLOSE_REQUEST))
    
    0 讨论(0)
提交回复
热议问题