# How do I change the size of the display window?

**URL:** <https://discourse.processing.org/t/how-do-i-change-the-size-of-the-display-window/25384>\
**Category:** Coding Questions\
**Created:** [November 13, 2020, 3:03am UTC](https://discourse.processing.org/t/how-do-i-change-the-size-of-the-display-window/25384 "2020-11-13T03:03:41Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [November 20, 2020, 12:17am UTC](https://discourse.processing.org/t/how-do-i-change-the-size-of-the-display-window/25384/27 "2020-11-20T00:17:55Z")

</div>

> [@Math\_Machine](#):
>
> , where can I download the “gotoloop.listener.CanvasResizeWatcher” library?

- The file “CanvasResizeWatcher.java” is itself the library.
- Just create a new file tab on the Processing IDE (PDE) w/ that exactly name w/o forgetting its “.java” extension.
- Then copy & paste the contents of that file from the Gist repo onto the new “.java” tab.
- Use `import gotoloop.listener.CanvasResizeWatcher;` in order to use its main top `class`.

> [@Math\_Machine](#):
>
> I’m very curious to see what it does,

- Basically it automatically calls back our own **frameResized()** every time the sketch’s window changes its dimensions.
- The file “Canvas\_Resize\_Watcher.pde” has an example on how to define our own **frameResized()** callback.

> [@Math\_Machine](#):
>
> , and how it could help me with this predicament.

As stated already the library “CanvasResizeWatcher.java” got code on how to apply the window object returned by PSurface::**getNative()** for each of the 4 Processing renderers (JAVA2D, FX2D, P2D, P3D).

---

_[View the full topic](https://discourse.processing.org/t/how-do-i-change-the-size-of-the-display-window/25384)._
