# How to make sketch size like the gray darker area?

**URL:** <https://discourse.processing.org/t/how-to-make-sketch-size-like-the-gray-darker-area/10964>\
**Category:** Processing\
**Created:** [May 6, 2019, 10:13am UTC](https://discourse.processing.org/t/how-to-make-sketch-size-like-the-gray-darker-area/10964 "2019-05-06T10:13:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stan\_11](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@stan\_11](https://discourse.processing.org/u/stan_11)\
**Post date:** [May 6, 2019, 10:13am UTC](https://discourse.processing.org/t/how-to-make-sketch-size-like-the-gray-darker-area/10964/1 "2019-05-06T10:13:04Z")

</div>

This is my code, But I only want the darker gray area in the picture, however, it seems that the default height of the processing window is 100. so that I can not shrink it anymore, is there anyone knows how to solve it?

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/fcfa9bf378010092ecb8ed60894575ee23c1a1bb.png)

```auto
void setup()
{
 size(200,50); 
}

```

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [May 6, 2019, 10:20am UTC](https://discourse.processing.org/t/how-to-make-sketch-size-like-the-gray-darker-area/10964/2 "2019-05-06T10:20:50Z")

</div>

> [@stan\_11](#):
>
> void setup() { size(200,50); }

```auto
void setup() {
 size(200,50,P2D);   
}

```

![SNAG-0106](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f815b46c92b238f6edf25e3e9ffbc9f0ad9b4ebd.jpeg)

---

<div class="post-metadata">

**Author:** ![stan\_11](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@stan\_11](https://discourse.processing.org/u/stan_11)\
**Post date:** [May 6, 2019, 12:25pm UTC](https://discourse.processing.org/t/how-to-make-sketch-size-like-the-gray-darker-area/10964/3 "2019-05-06T12:25:29Z")

</div>

I met some problems using P2D, is there any JAVA2D version? I guess the problem is something related to my setup, I am using mac mojave. I get warnings when I use P2D out of nowhere.

```auto
0 AppKit 0x00007fff31aee2e3 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 386
	1 AppKit 0x00007fff31aeb68c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
	2 AppKit 0x00007fff31aeb0b6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
	3 libnativewindow_macosx.jnilib 0x000000012b5493fe Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 + 398
	4 ??? 0x00000001191ffa88 0x0 + 4716493448

```

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [May 6, 2019, 12:27pm UTC](https://discourse.processing.org/t/how-to-make-sketch-size-like-the-gray-darker-area/10964/4 "2019-05-06T12:27:42Z")

</div>

does it work and is only a warning?  
i think its reported already,  
or does it not draw anything?  
would mean ERROR.
