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 How to adjust the maximized size of Frame based on resolution of screen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to adjust the maximized size of Frame based on resolution of screen" Watch "How to adjust the maximized size of Frame based on resolution of screen" New topic
Author

How to adjust the maximized size of Frame based on resolution of screen

Ashutosh M Kulkarni
Ranch Hand

Joined: Jun 07, 2010
Posts: 41

As the subject says, if a frame is executed on different screen resolutions (the most common 800x600 and 1024x768, in the regular, non-HD, non-widescreen display screen), is there a way to set it up that "maximize" button will maximize the frame to fit screen with whatever resolution set?

Also, how to open it in maximized form by default?

Thanks,
Ashutosh


SCJP 6, next stop - OCPJWCD!
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3649
    
  17

Um, the maximize button does this by default, doesn't it? Are you experiencing any problems?

You can maximize the frame programmatically before making it visible.
Ashutosh M Kulkarni
Ranch Hand

Joined: Jun 07, 2010
Posts: 41

Err, yes. I was having some problem with the Maximize button, when I tested it on different machines with different screen res.
But now when I did that again, it seems to work all fine. Sorry about the fuss

Thanks for replying,
Ashutosh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to adjust the maximized size of Frame based on resolution of screen