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

GridBagConstraints documentation error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.0
    • docs
    • beta
    • generic
    • generic



      Name: skT88420 Date: 06/22/99


      Please read this carefully. The correct description
      is the opposite of what one would think at first.

      Checking the weightx in a column and the weighty in a row
      seems to be wrong, but it will get the information that is
      needed - at least the way I read these explanations.
      Just remember what you are trying to adjust - vertical or
      horizontal space.
       

      I think you have weightx and weighty mixed up in the definitions
      of each weightx and weighty.
      Corrected variable names is inserted below as [?? weight ??].

      The definitions state "all the components in a row" for both
      weightx and weighty. This can't be correct for both. I think
      weightx should read "all the components in a column".


      If these are not errors, then the explanation needs to be
      expanded because it doesn't make sense the way it is written.


      http://java.sun.com/products/jdk/1.2/docs/api/java/awt/
      GridBagConstraints.html#weighty (and #weightx)

      weightx

      public double weightx

      Specifies how to distribute extra **horizontal** space.

      The grid bag layout manager calculates the weight of
      a column to be the maximum weighty [?? weightx ??] of
      all the components in a row[?? column ??]. If the resulting
      layout is smaller horizontally than the area it needs to fill,
      the extra space is distributed to each column in proportion to
      its weight. A column that has a weight zero receives no extra
      space.

         



      weighty

      public double weighty

      Specifies how to distribute extra **vertical** space.

      The grid bag layout manager calculates the weight of a row to be
      the maximum weightx [?? weighty ??]of all the components in a
      row. ...
      (Review ID: 84664)
      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            skonchad Sandeep Konchady
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: