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

JPanels in containers with GridBagLayout does not appear

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.6.0_16"
      Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
      Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      Linux desktop 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      X Window System Version 6.8.2
        Release Date: 9 February 2005
      X Protocol Version 11, Revision 0, Release 6.8.2
      Build Operating System: Linux 2.4.21-25.ELsmp i686 [ELF]
      Current Operating System: Linux desktop 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686
      Build Date: 19 September 2005
      Build Host: porky.build.redhat.com

              Before reporting problems, check http://wiki.X.Org
              to make sure that you have the latest version.
      Module Loader present
      OS Kernel: Linux version 2.6.9-22.ELsmp (###@###.###) (gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)) #1 SMP Mon Sep 19 18:32:14 EDT 2005 PF


      A DESCRIPTION OF THE PROBLEM :
      We have a product with a UI in which many containers (JPanels) with GridBagLayout. Each of these containers include one main child (JPanel).

      Using java 1.5 and the child appears in the container occupying the whole area.
      During the tests with Java1.6, the child JPanel does not exist anymore. and this problem appeared only since Java1.6 U13 (to update 16)

      We figured out that the child panel is there but with a null size.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      we found a workaround in our code by adding the following listener in parent containers :

      addComponentListener(new ComponentAdapter() {
      @Override
      public void componentResized(ComponentEvent e) {
      childPanel.setSize(this.getSize()):
      }
      });

      Release Regression From : 6u12
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: