Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Swing Design Screen Resolution Problem

 
Ganesh Pat
Ranch Hand
Posts: 79
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2969
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 79
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tony I'll try it
 
Tony Docherty
Bartender
Posts: 2969
59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My pleasure.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic