wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Swing Design Screen Resolution Problem 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 "Swing Design Screen Resolution Problem " Watch "Swing Design Screen Resolution Problem " New topic
Author

Swing Design Screen Resolution Problem

Ganesh Pat
Ranch Hand

Joined: Feb 04, 2012
Posts: 79

hey friends I've designed forms using swing in 1024 by 786 but it doesn fit in 800 by 600. Once i had designed swing in 1200 ir something more resolution and id didn't fit in 1024. All text filed n all get off the screen.

I used BoxLayout to swing where i will add another swing which had free design .

So i just want to know which is best layouts combination to use ? and how to get rid of this resolution problems. If i design a project in a system that doesn't fit in other system its ludicrous please guys need guidance .
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2339
    
  50
If you use LayoutManagers then you shouldn't get this problem as they resize components to fit the available area. You only get this sort of problem when you either manually position and size components, or you are set the physical size of the JFrame rather than calling pack() to let it calculate it's ideal size. If you want to the frame to be full screen then call myFrame.pack() and then call myFrame.setExtendedState(Frame.MAXIMIZED_BOTH).
Ganesh Pat
Ranch Hand

Joined: Feb 04, 2012
Posts: 79

Thank you Tony I'll try it
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2339
    
  50
My pleasure.
 
 
subject: Swing Design Screen Resolution Problem