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

GridBagLayout: document < preferred size resizing behaviour

XMLWordPrintable

    • Fix Understood
    • x86
    • windows_2003

      A DESCRIPTION OF THE REQUEST :
      According to :
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4247013
      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4188906
      GridBagLayout has some "interesting" behaviour when the available space drops below the preferred size of the components, particularly when the component in question is a JTextField.

      Please document this behaviour, either in the javadoc for GridBagLayout or in the Javadoc Tutorial.


      JUSTIFICATION :
      GridBagLayout is widely for complex adaptive layout. Adaptivity includes the ability to cope with displays where < the recommended amount of space is available.
      Good GUI design requires that designers be capable of doing this with the minimum number of surprises.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Good documentation.
      ACTUAL -
      No documentation.

      ---------- BEGIN SOURCE ----------
      See bugs referenced.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None.

      I set c.weightx = 1; c.fill = GridBagConstraints.HORIZONTAL sometimes, but then I end up with textfields that grow too much when the display gets large.

            dav Andrei Dmitriev (Inactive)
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: