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

Size restriction on GridBagLayout=512

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.1, 1.1.6, 1.1.8, 1.3.0
    • client-libs
    • generic, sparc
    • generic, solaris_2.5.1, solaris_2.6, solaris_7



      Name: sg39081 Date: 08/12/97


      In java.awt.GridBagLayout (v1.1 & v1.1.1) we have the
      following:

      public class GridBagLayout implements LayoutManager2,
                                            java.io.Serializable {
       
        protected static final int MAXGRIDSIZE = 512;
      :
      :
      }


      The maximum number of rows ( & columns ) is set by a constant
      and cannot be changed. I have a scroll area and require more
      than 512 widgets.
      company - R. A. Ward Ltd. , email - ###@###.###
      ======================================================================

      Name: krT82822 Date: 09/27/99


      I can consistently get GridBagLayout to throw the following exception:

      java.lang.ArrayIndexOutOfBoundsException
              at java.awt.GridBagLayout.GetLayoutInfo(Compiled Code)
              at java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:476)
              at java.awt.Container.preferredSize(Container.java:563)
              at java.awt.Container.getPreferredSize(Container.java:546)
              at javax.swing.JComponent.getPreferredSize(Compiled Code)
              at camcyber.repl.snmp.mrgo.QueryResultDialog.displayByRow(Compiled Code)
      ...

      The problem appears to be associated with the number of rows in the layout. If there are fewer than about 512 rows, then I never get the exception. The exception always gets thrown if there are more than about 512 rows in the layout.
      (Review ID: 95774)
      ======================================================================

            ehawkessunw Eric Hawkes (Inactive)
            sgoodsunw Sheri Good (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: