Results 1 to 2 of 2
Thread: Screen Resolution Problems
- 10-04-2009, 05:27 PM #1
Member
- Join Date
- Feb 2009
- Posts
- 2
- Rep Power
- 0
Screen Resolution Problems
I am writing a program using GridBagLayout for my JFrames and JPanels. I have my screen resolution set to 1280 X 800. However, when my co-workers run the program with a lower screen resolution, many of the Components become tiny. I can get the same effect by manually making the window smaller by dragging the corner. There seems to be a point at which some (not all) of the components all at once shrink from normal size to tiny. I have set the PreferredSize for the components, if that is helpful in sorting this out. Can you please tell me how to make it so if the screen resolution is lower, or if the user makes the window smaller, the components get a little smaller instead of all at once becoming so tiny you can't use them?
Thanks,
Rick Kaufman
- 10-04-2009, 06:07 PM #2
Senior Member
- Join Date
- Jul 2009
- Posts
- 1,146
- Rep Power
- 5
Yes, that is one of the drawbacks of using a GridBagLayout. I never use that layout since I find it too confusing to use, but I believe the problem is the minimum size. As the components size shrinks below its preferred size, it automatically jumps to the minimum size. So I believe the solution is to set the minimum size equal to the preferred size.
Similar Threads
-
Blank Screen while navigating from one screen to another
By mohana.krishna in forum Java ServletReplies: 0Last Post: 03-03-2009, 05:03 PM -
Resolution problem!
By jan1ey in forum New To JavaReplies: 1Last Post: 03-03-2009, 07:36 AM -
What's Your New Year's Resolution?
By CaptainMorgan in forum Forum LobbyReplies: 4Last Post: 11-16-2008, 09:05 PM -
Prob. with screen resolution and Frame size??
By SANDY_INDIA in forum AWT / SwingReplies: 1Last Post: 08-16-2008, 12:51 PM -
How to change the resolution ?
By samson in forum Java 2DReplies: 1Last Post: 07-17-2007, 11:15 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks