[5359] in java-interest
RE: How do I specify rows/columns for GridBagLayout?
daemon@ATHENA.MIT.EDU (Cay Horstmann)
Tue Feb 6 15:14:04 1996
From: Cay Horstmann <horstman@jupiter.SJSU.EDU>
To: "'Amy Fowler'" <Amy.Fowler@Eng.Sun.COM>,
"'gnicaj@iu.net'"
<gnicaj@iu.net>,
"'java-interest@java.Eng.Sun.COM'"
<java-interest@java.Eng.Sun.COM>,
"'java@java.Eng.Sun.COM'"
<java@java.Eng.Sun.COM>,
"'john@insightnews.com'"
<john@insightnews.com>,
"'jug@jug.org'" <jug@jug.org>
Date: Tue, 6 Feb 1996 09:59:09 -0800
And when you do that, be sure to specify a resize() in the
Canvas constructor. Otherwise, the size will be assumed zero and the GBL will lay out your zero size canvas with great enthusiasm.
Cay
horstman@cs.sjsu.edu
----------
From: Amy Fowler[SMTP:Amy.Fowler@Eng.Sun.COM]
Sent: Monday, February 05, 1996 12:23 PM
To: Amy.Fowler@Eng.Sun.COM; java-interest@java.Eng.Sun.COM; java@java.Eng.Sun.COM; john@insightnews.com; jug@jug.org; gnicaj@iu.net
Subject: RE: How do I specify rows/columns for GridBagLayout?
>>
>>Is it possible to use a GridBagLayout to draw Images?
>>When I draw an image I need to specify the coordinates, but the GridBagLayout
doesn't allow that - you just add it..
>>How can I get an Image on the GridBagLayout?
I would recommend creating a subclass of Canvas (ImageCanvas
or something) which knows how to render the image on the
canvas, and then just add the canvas to your GridBagLayout.
Regards,
Amy Moore-Fowler
Java Products Group
Sun Microsystems, Inc.
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com