We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Beginner: Maximize Window on startup
Page Index Toggle Pages: 1
Beginner: Maximize Window on startup (Read 866 times)
Beginner: Maximize Window on startup
Jan 14th, 2008, 3:09pm
 
Hi. Is there a way to have my project maximize the project window on startup?

Thanks for your help.

My current code:
-------------------------------------------
PFont font;

void setup() {frame.setResizable(true);
}

void draw() {
 
   //background(255);
 rect(10, 10, width-20, height-20);

}
Re: Beginner: Maximize Window on startup
Reply #1 - Jan 14th, 2008, 11:36pm
 
just pass the screen dimensions to the size() method:

Quote:

void setup() {
 size(screen.width,screen.height);
 frame.setResizable(true);
}

void draw() {
 background(255);
 rect(10, 10, width-20, height-20);
}


Re: Beginner: Maximize Window on startup
Reply #2 - Jan 15th, 2008, 4:20pm
 
So there is no way to automagicly maximize the project window?

Thanks for the help.

Re: Beginner: Maximize Window on startup
Reply #3 - Jan 15th, 2008, 5:13pm
 
what do you mean by "automatic"?

if you want to maximize the window during runtime, try something like this:

Quote:

void setup() {
 size(400,400);
 frame.setResizable(true);
}

void draw() {
 background(255);
 rect(10, 10, width-20, height-20);
}

void mousePressed() {
 frame.setSize(screen.width,screen.height);
}
Page Index Toggle Pages: 1