Search code examples
scalafx

How do I handle exiting ScalaFX


I use java.util.Timer to run a method every 10th of a second.

I have to cancel this before exiting ScalaFX.

How do I accomplish this?


Solution

  • JFXApp has method stopApp that is called when the application stops. You can cancel your timer there.