File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 15286

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

GenRocket - A Test Data Generation Platform
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.
I agree. Here's the link:
subject: Maximizing JFrame
Similar Threads
Screen Size
full screen size of JFRame in swing
Size of JFrame according to screen
Maximizing JFrame
How to Start Applet Maximized