# Dimension of the display window

**URL:** <https://discourse.processing.org/t/dimension-of-the-display-window/5063>\
**Category:** Beginners\
**Created:** [October 31, 2018, 5:03pm UTC](https://discourse.processing.org/t/dimension-of-the-display-window/5063 "2018-10-31T17:03:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ACT](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@ACT](https://discourse.processing.org/u/ACT)\
**Post date:** [October 31, 2018, 5:03pm UTC](https://discourse.processing.org/t/dimension-of-the-display-window/5063/1 "2018-10-31T17:03:10Z")

</div>

What are the sizes of the window display?

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [October 31, 2018, 5:05pm UTC](https://discourse.processing.org/t/dimension-of-the-display-window/5063/2 "2018-10-31T17:05:14Z")

</div>

I’m not sure to get your question.

You set the size you want in the `setup()` function with the [size()](https://processing.org/reference/size_.html) function.

---

<div class="post-metadata">

**Author:** ![ACT](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@ACT](https://discourse.processing.org/u/ACT)\
**Post date:** [October 31, 2018, 5:10pm UTC](https://discourse.processing.org/t/dimension-of-the-display-window/5063/3 "2018-10-31T17:10:36Z")

</div>

Yes i know that but I need to set a size for the window display bigger than 640,480. If i set a random size bigger than 640,480 the processing sketch stops working.

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [October 31, 2018, 5:13pm UTC](https://discourse.processing.org/t/dimension-of-the-display-window/5063/4 "2018-10-31T17:13:37Z")

</div>

Can you post your code please? It is not supposed to happen, you should be able to use the size you want!

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [November 1, 2018, 1:28am UTC](https://discourse.processing.org/t/dimension-of-the-display-window/5063/5 "2018-11-01T01:28:18Z")

</div>

You can set the size of the Sketch with size(int, int) and get the respective size with width or height.  
I.e;

```auto
size(500, 500);
int x = width;
int y = heigth;

```

You can set the sketch to any size you want. Just try to avoid using variables inside it. At least that’s what it started telling me some weeks ago…
