wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes size of the frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "size of the frame" Watch "size of the frame" New topic
Author

size of the frame

hari thatikonda
Greenhorn

Joined: Sep 09, 2004
Posts: 11
hey usually when we run the gui frame has the size that we specified when we maximize it, it grows up to full size of screen. here wht i want is when we run the the programme the frame should be the size of the screen(ofcourse differenct monitors have different screen size) and then i should be able to minimize for a certain length. how can i do that.
thank u
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
setSize((int)dim.getWidth(),(int)dim.getHeight());
 
Consider Paul's rocket mass heater.
 
subject: size of the frame
 
Similar Threads
get the size of the full screen in current settings(urgent)
full size of the screen(urgent)
being notified of screen resolution changes
Scrollbars on JFrame when JInternalFrame is bigger than the JFrame
screen resolution problem