This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Maximizing JFrame 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 "Maximizing JFrame" Watch "Maximizing JFrame" New topic

Maximizing JFrame

Narayanan Jayaraman
Ranch Hand

Joined: Apr 09, 2003
Posts: 52
How maiximze the Jframe size ?. Like dobule clicking maximize application windows to screen size , is it possible to set jframe size to screen size ?. Thanks
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

Look at the setExtendableState method of JFrame in JDK1.4 or greater.

GenRocket - Experts at Building Test Data
Narayanan Jayaraman
Ranch Hand

Joined: Apr 09, 2003
Posts: 52
Is it possible in JDK 1.3 ?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

You can do something like :

This just makes the frame the size of the screen, it doesn't set the state to 'maximized', though (i.e. the maximize button on the frame doesn't change...). You can only do that in 1.4+.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
It is sorta covered in the JavaRanch Style Guide.
subject: Maximizing JFrame
Similar Threads
full screen size of JFRame in swing
How to Start Applet Maximized
Maximizing JFrame
Size of JFrame according to screen
Screen Size