aspose file tools*
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Maximizing JFrame" Watch "Maximizing JFrame" New topic
Author

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: 15292
    
    6

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
Bartender

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+.


-Nate
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
Screen Size
Size of JFrame according to screen
Maximizing JFrame
How to Start Applet Maximized
full screen size of JFRame in swing