Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4174170

GridBagLayout should allocate space based on minimum size and weights only

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: el35337 Date: 09/16/98


      There are two specific problems with grid bag.

      1) If a JComboBox and a JTextField are placed
         side-by-side in two different columns (with
         equal weights), the JComboBox always gets more
         horizontal space than the JTextField. This is
         because grid bag uses preferred size instead
         of minimum size.

      2) If there are two columns with equal weights
         and one column has a fixed width component,
         then the column with the fixed width component
         will always be that much wider. When a column
         has a non-zero weight then only the weight
         should be used to size the column.

      I realize that this goes against the stated
      behavior of GridBagLayout, but these enhancements
      would really simplify creating layouts with the
      Swing components. Perhaps a new grid bag class
      is needed?
      (Review ID: 38809)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              mmartaksunw Michael Martak (Inactive)
              Reporter:
              elarsen Erik Larsen (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: