# How do you detect / stop someone from closing the sketch?

**URL:** <https://discourse.processing.org/t/how-do-you-detect-stop-someone-from-closing-the-sketch/26864>\
**Category:** Coding Questions\
**Created:** [January 7, 2021, 9:27pm UTC](https://discourse.processing.org/t/how-do-you-detect-stop-someone-from-closing-the-sketch/26864 "2021-01-07T21:27:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)\
**Post date:** [January 7, 2021, 10:09pm UTC](https://discourse.processing.org/t/how-do-you-detect-stop-someone-from-closing-the-sketch/26864/2 "2021-01-07T22:09:24Z")

</div>

> [@Save when app close, exit() ... stop()](https://discourse.processing.org/t/save-when-app-close-exit-stop/25754/7):
>
> Interesting. Try this then: public void dispose() { println("Print this when sketch is closed."); super.dispose(); }

---

_[View the full topic](https://discourse.processing.org/t/how-do-you-detect-stop-someone-from-closing-the-sketch/26864)._
