File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JFrame maximize not really maximized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JFrame maximize not really maximized" Watch "JFrame maximize not really maximized" New topic
Author

JFrame maximize not really maximized

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I have a JFrame that is setBounds(0, 0, screen.width, screen.height);
So that it makes it "maximized" and even though it is the full size of the screen, it isn't truly Maximized. You can still click the maximize button and it will dock the window to the screen. Is there a way to do this on load? Could you envoke the Robot class to push this button and if so, what would the call be?
Thanks

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
If you're using 1.4, you could do it like this:
myFrame.setExtendedState(Frame.MAXIMIZED_BOTH);
I don't think you can do this with earlier versions...
Randy
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Thanks Randy!!! Too bad I am not using 1.4 I guess when it goes out of BETA I probably will.
Thanks again!!

------------------
Happy Coding,
Gregg Bolinger
John Smith
Ranch Hand

Joined: Jul 20, 2001
Posts: 84
I don't know your situation, but I've been using 1.4 BETA for the past couple of months and haven't had any problems. It is quite stable...
Randy
 
 
subject: JFrame maximize not really maximized