# My RUN window has gone part off the pc screen!

**URL:** <https://discourse.processing.org/t/my-run-window-has-gone-part-off-the-pc-screen/34408>\
**Category:** Coding Questions\
**Created:** [January 1, 2022, 2:47pm UTC](https://discourse.processing.org/t/my-run-window-has-gone-part-off-the-pc-screen/34408 "2022-01-01T14:47:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NigelWoollard](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@NigelWoollard](https://discourse.processing.org/u/NigelWoollard)\
**Post date:** [January 1, 2022, 2:47pm UTC](https://discourse.processing.org/t/my-run-window-has-gone-part-off-the-pc-screen/34408/1 "2022-01-01T14:47:28Z")

</div>

Some programs that I have written are running the active window off my screen (there is about a third of the height sticking down from the top off the screen . I have tried copy and pasting into a new file but this has no effect ! Any help please ? !

It only occurs in p3 files that are pinned to desktop so I suppose this is something to do with it ?

The program is a bit messy and incoherent as it was in progress.

Here is the program

// \*\*\*\*\*\*\*\*\* PLANETS \*\*\*\*\*\*\*\*\*\*\*\*\*

int[]planetsx= new int [100]; // 100 planets : x coos  
int[]planetsy= new int [100]; // 100 planets : y coos  
int[]planetsz= new int [100]; // 100 planets : z coos

int []planetfillR = new int [100];  
int []planetfillB = new int [100]; // planet colour arrays  
int []planetfillG = new int [100];

int []planetsize = new int [100]; // planet sizes array

float x;  
float y;  
float z;  
float s=.1;  
float altitude=1;  
float turn;  
float cx=PI/2;  
float a=PI/256;  
void setup(){

size (2000,2000,P3D);

for (int i=0;i\<100;i++){

planetsx[i]=int (random(-2000,2000));  
planetsy[i]=int (random(-2000,2000));  
planetsz[i]=int (random(-2000,2000));

planetfillR[i]=int (random(255));  
planetfillB[i]=int (random(255));  
planetfillG[i]=int (random(255));

planetsize[i]=int (random(50));

}}

void draw(){

background(#1F0531); //spotLight(0, 2, 126, 0, 0, -400, -1, 0, 0, PI/3, 52);  
pointLight(51, 102, 126, 35, 40, 36);

for (int i=0;i\<100;i++){

// OBJECT - PLANET  
camera (0,0,0,0,cx,0,1,0,0);  
rotateX(radians(cx));  
pushMatrix();

translate (planetsx[i]+x,planetsy[i]+y,planetsz[i]+z);

sphere (planetsize[i]);  
noStroke ();  
fill ((planetfillR[i]) , (planetfillB[i]) ,(planetfillG[i]));

popMatrix();

// MOVE CAMERA AROUND  
if (keyPressed){  
if (key == ‘/’){x=x+s;} //RIGHT  
if (key == ‘,’){x=x-s;} //LEFT  
if (key == ‘c’){y=y-s;} //ALTITUDE UP  
if (key == ‘z’){y=y+s;} //ALTITUDE DOWN  
if (key == ‘x’){z=z-s;} //BACK  
if (key == ‘.’){z=z+s;} //FORTH  
if (key == ‘m’){cx=cx+a;} // rotate cam side to side  
if (key == ‘v’){cx=cx-a;}

}

}}

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [January 2, 2022, 9:03am UTC](https://discourse.processing.org/t/my-run-window-has-gone-part-off-the-pc-screen/34408/2 "2022-01-02T09:03:03Z")

</div>

> [@NigelWoollard](#):
>
> size (2000,2000,P3D);

Taking into account the window border and title bar your window is slightly bigger than 2000x2000 pixels.

What is the resolution of your screen?

You can set the location for the top left corner of the window like this

```auto
  size (2000, 2000, P3D);
  surface.setLocation(100,100);

```

This will make the top of the window visible on the screen
