Results 1 to 4 of 4
  1. #1
    AutoRobin is offline Member
    Join Date
    Apr 2011
    Posts
    5
    Rep Power
    0

    Default GridBagLayout Resizing

    I've just started learning about GridBagLayout. I'm in the processes of turning a GridLayout gui into a GridBagLayout GUI. Everything works great. My only hiccup is that whenever items get removed or added, the Layout resizes itself. All I want is for the columns and rows to be equal height and width always, regardless of the size of components. I've tried reassigning c.fill and c.weight*. Does not seem to do the trick. Any suggestions?

    Thanks

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    All I want is for the columns and rows to be equal height and width always, regardless of the size of components
    That is what a GridLayout was designed for.

    GridBagLayout was NOT designed for that purpose.

  3. #3
    AutoRobin is offline Member
    Join Date
    Apr 2011
    Posts
    5
    Rep Power
    0

    Default

    Ugh. Not the response I wanted. I feel like I need GridBagLayout because I want some components to occupy several cells.

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

Similar Threads

  1. resizing a rectangle?
    By ludis in forum New To Java
    Replies: 9
    Last Post: 12-12-2010, 02:00 PM
  2. panel resizing
    By simo_mon in forum AWT / Swing
    Replies: 1
    Last Post: 08-15-2009, 03:09 PM
  3. panel resizing
    By kumar_gemi in forum New To Java
    Replies: 3
    Last Post: 03-13-2009, 03:51 AM
  4. Image Resizing and DPi
    By Rob_ in forum Java Applets
    Replies: 4
    Last Post: 11-27-2008, 03:21 PM
  5. Image resizing
    By alley in forum Java 2D
    Replies: 2
    Last Post: 11-13-2007, 11:10 AM

Tags for this Thread

Posting Permissions

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