Results 1 to 2 of 2
  1. #1
    RicKaufman is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default 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?
    Rick Kaufman

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Rep Power


    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

  1. Blank Screen while navigating from one screen to another
    By mohana.krishna in forum Java Servlet
    Replies: 0
    Last Post: 03-03-2009, 06:03 PM
  2. Resolution problem!
    By jan1ey in forum New To Java
    Replies: 1
    Last Post: 03-03-2009, 08:36 AM
  3. What's Your New Year's Resolution?
    By CaptainMorgan in forum Forum Lobby
    Replies: 4
    Last Post: 11-16-2008, 10:05 PM
  4. Prob. with screen resolution and Frame size??
    By SANDY_INDIA in forum AWT / Swing
    Replies: 1
    Last Post: 08-16-2008, 01:51 PM
  5. How to change the resolution ?
    By samson in forum Java 2D
    Replies: 1
    Last Post: 07-17-2007, 12:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts