This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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


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: 15302
    
    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.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Maximizing JFrame
 
It's not a secret anymore!