setting Platform.setImplicitExit(false); for using FXCanvas to resolve
JavaFX Api thread problem