Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GridBagLayout MAXGRIDSIZE

2 views
Skip to first unread message

Myriam Abramson

unread,
Sep 22, 1999, 3:00:00 AM9/22/99
to

Hi,

I'm still using AWT jdk 1.1.6, helas!

I am trying to make a table in AWT using the GridBagLayout manager.
When I have many rows to display I get an error:


java.lang.ArrayIndexOutOfBoundsException: 512
at java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:724)
at java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:484)
at java.awt.Container.preferredSize(Container.java:573)
at java.awt.Container.getPreferredSize(Container.java:556)
at java.awt.ScrollPane.calculateChildSize(ScrollPane.java:317)
at java.awt.ScrollPane.layout(ScrollPane.java:349)
at java.awt.ScrollPane.doLayout(ScrollPane.java:305)
at java.awt.Container.validateTree(Container.java:529)
at java.awt.Container.validateTree(Container.java:536)
at java.awt.Container.validate(Container.java:511)
at java.awt.Window.show(Window.java:152)

I think I might have more rows than specified in MAXGRIDSIZE.
Since GridBagLayout.MAXGRIDSIZE is "protected static final", how can
I override that?

Thanks for your help.


--
myriam

Go Proverb:

If you don't understand the ladders, don't play go.

Biju Thomas

unread,
Sep 22, 1999, 3:00:00 AM9/22/99
to

I don't think there is any way to overcome this limitation of
GridBagLayout.

MAXGRIDSIZE is 512. If you are using more than 512 rows of other AWT
components, the user interface will become very slow.

May be you should look into other ways to implement table. (Why not use
swing?)

--
Biju Thomas

0 new messages