# Off screen display windows placement when using P3D or P2D

**URL:** <https://discourse.processing.org/t/off-screen-display-windows-placement-when-using-p3d-or-p2d/47405>\
**Category:** Coding Questions\
**Created:** [October 20, 2025, 2:24am UTC](https://discourse.processing.org/t/off-screen-display-windows-placement-when-using-p3d-or-p2d/47405 "2025-10-20T02:24:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 20, 2025, 8:56am UTC](https://discourse.processing.org/t/off-screen-display-windows-placement-when-using-p3d-or-p2d/47405/2 "2025-10-20T08:56:35Z")

</div>

Hello @dkemp ,

Try this and change x and y as required:

```auto
void setup()
  {
  size(300, 300, P2D);
  int x = 600;
  int y = 600;
  surface.setLocation(x, y);
  }
  
void draw()
  {
  }

```

Reference:

> **[setLocation() / Reference](https://processing.org/reference/setlocation_)**
>
> The setLocation() function defines the position of the Processing sketch in relation to the upper-left corner of the computer screen. There are more features of PSurface documented…

I know the scaling affects my sketch window size:

> [@Launcher for Multi-Renderer PApplets](https://discourse.processing.org/t/launcher-for-multi-renderer-papplets/46764):
>
> Hello folks! My exploration of a launcher for PApplets with different renderers. This was used primarily for testing Windows scaling on my W10 system and how it affects the sketch window. Code: /\*\* \* Launcher for Multi-Renderer PApplets \* \* Author: glv \* Date: 2025-07-07 \* \* Description: \* Launches four separate Processing sketches (PApplets) using different renderers: \* - JAVA2D \* - P2D \* - P3D \* - FX2D \* \* Each renderer runs in its own thread, with readiness flags for commu…

`:)`

---

_[View the full topic](https://discourse.processing.org/t/off-screen-display-windows-placement-when-using-p3d-or-p2d/47405)._
