[5190] in java-interest
How do I specify rows/columns for GridBagLayout?
daemon@ATHENA.MIT.EDU (John D. Kane)
Wed Jan 31 18:58:11 1996
From: "John D. Kane" <john@insightnews.com>
To: "'java@java.sun.com'" <java@java.sun.com>,
"'java-interest@java.sun.com'" <java-interest@java.sun.com>,
"'jug@jug.org'" <jug@jug.org>
Date: Wed, 31 Jan 96 17:34:00 PST
It appears to me that when I use GridBagLayout and GridBagConstraints,
whatever I'm using them on -- whether it be a panel, window, frame, etc, --
the grid size is always 1x1.
The GridBagConstraints gridx and gridy variables and gridwidth and
gridheight variables exist to place components on the grid. I want to be
able to use them.
How can I specify the number of columns and rows in the grid? If I use:
setLayout(new GridLayout(10, 10));
then I can't use GridBagConstraints and GridBagLayout (I can but they don't
work), so I think this is not the answer I'm looking for.
So I end up using such things as RELATIVE, BOTH, etc. rather than specific
grid positions. These work alright but they're not specific enough. Of
course, I don't want to tie the components to specific coordinates because I
want them to be flexible when the window changes size.
Any help would be much appreciated.
John
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com