aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Newbie JFrame setSize() question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Newbie JFrame setSize() question" Watch "Newbie JFrame setSize() question" New topic
Author

Newbie JFrame setSize() question

Scott Matthews
Ranch Hand

Joined: Jun 28, 2001
Posts: 36
In all the small programs I have written, I have given the JFrame a specific width and height using setSize(w,h).
Question: How can I make the JFrame take up the entire screen?
Thanks.
Durga Penmatsa
Greenhorn

Joined: Aug 14, 2001
Posts: 23
Hi,
You could use :
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
frame.setSize(screenSize.width, screenSize.height);
Does that answer the question.
Regards
Durga

Originally posted by Scott Matthews:
In all the small programs I have written, I have given the JFrame a specific width and height using setSize(w,h).
Question: How can I make the JFrame take up the entire screen?
Thanks.

Scott Matthews
Ranch Hand

Joined: Jun 28, 2001
Posts: 36
That did the trick.
Thank you.
 
jQuery in Action, 2nd edition
 
subject: Newbie JFrame setSize() question