# How to disable window maximization

**URL:** https://discourse.processing.org/t/how-to-disable-window-maximization/30713
**Category:** Beginners
**Created:** [June 15, 2021, 1:18am UTC](https://discourse.processing.org/t/how-to-disable-window-maximization/30713 "2021-06-15T01:18:51Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Flolo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/flolo/32/13874_2.png) [@Flolo](https://discourse.processing.org/u/Flolo)
#### Post date: [June 22, 2021, 3:44pm UTC](https://discourse.processing.org/t/how-to-disable-window-maximization/30713/4 "2021-06-22T15:44:18Z")

</div>

Hey, I don’t know if it’s the best solution, but it seems to work:

```auto
void setup() {
  //for the background color
  colorMode(HSB, 10000, 10000, 10000);
  //Fullscreen "disables" the button
  fullScreen(P2D);
  //sets the size 
  surface.setSize(600, 600);
  //And so that the window is not on the top left, we put it in the middle
  surface.setLocation(displayWidth/2-width/2, displayHeight/2-height/2);
}
void draw() {
  background(millis()%10000, 10000, 10000);
}

```

I hope I could help you 🙂

---

_[View the full topic](https://discourse.processing.org/t/how-to-disable-window-maximization/30713)._
