# surface.setResizable(false); doesn't work in the P2D renderer

**URL:** https://discourse.processing.org/t/surface-setresizable-false-doesnt-work-in-the-p2d-renderer/32620
**Category:** Coding Questions
**Created:** [October 5, 2021, 9:20am UTC](https://discourse.processing.org/t/surface-setresizable-false-doesnt-work-in-the-p2d-renderer/32620 "2021-10-05T09:20:21Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)
#### Post date: [October 7, 2021, 4:10pm UTC](https://discourse.processing.org/t/surface-setresizable-false-doesnt-work-in-the-p2d-renderer/32620/2 "2021-10-07T16:10:26Z")

</div>

Hi @s31,

I don’t think it is possible to set resizable to false using P2D render.

> <https://github.com/processing/processing/issues/5617>
>
> \## Description
> P2D won't disable "maximize" button on \`surface.setResizable(fal…se)\` callback.
> 
> \## Expected Behavior
> Maximize/minimize button on the frame is disabled.
> 
> \## Current Behavior
> It won't let you resize by hand, but the maximize/minimize button is still there being enabled.
> 
> \## Steps to Reproduce
> 1. Set renderer as P2D in \`settings()\` body
> \`\`\`java
> public void settings() {
> size(100, 100, P2D);
> ....
> }
> \`\`\`
> 2. Use this as \`setup()\` body;
> \`\`\`java
> public void setup() {
> surface.setResizable(false);
> ....
> }
> \`\`\`
> 3. You can see the maximize button enabled. Use it to fullscreen your frame.
> 
> \## Your Environment
> \* Processing version: 3.4 (Stable)
> \* Operating System and OS version: Windows 7 Home Premium

There is another thread in the forum that might be helpful, but might not be the best solution

> [@How to disable window maximization](https://discourse.processing.org/t/how-to-disable-window-maximization/30713/4):
>
> Hey, I don’t know if it’s the best solution, but it seems to work: 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/surface-setresizable-false-doesnt-work-in-the-p2d-renderer/32620)._
