how to stop “JavaFX Application Thread”

后端 未结 4 1684
暖寄归人
暖寄归人 2020-12-15 06:31

I have a simple console application which sometimes need to perform graphics operations, for those I\'m using JavaFx framework (there are some functions that I need like the

4条回答
  •  春和景丽
    2020-12-15 07:19

    That's a slippery situation, as (to my understanding) the purpose of the JavaFX thread is to take advantage of various hardware pipelines transparently. Might I suggest placing your JavaFX requests in a separate, referenced, project; and keep everything else, including your main method, in another? That's always worked for me.

    Basically, business logic and model go in one project, and view and control (generally JavaFX-based) go in the other. This allows for independent termination of the JavaFX thread. Hopefully that is applicable to what you are trying to do.

提交回复
热议问题