[5314] in java-interest

home help back first fref pref prev next nref lref last post

RE: How do I specify rows/columns for GridBagLayout?

daemon@ATHENA.MIT.EDU (Groshe)
Mon Feb 5 21:46:58 1996

From: Groshe <gnicaj@iu.net>
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: Mon, 5 Feb 1996 20:33:20 -0500

Amy,

Thanks for your reply.
However, I'm forced to bug everyone again because I can't get the image on the GridBagLayout at all.
I have defined an instance of Canvas and am able to draw it using the BorderLayout.
If I change my Layout to GridBagLayout - nothing happens - no errors, no image.
I can add other Components to the GridBagLayout.

Has anyone been able to successfully get a Canvas object on the GridBagLayout?

What am I doing wrong?

Any help is well appreciated.

Thanks - Groshe
----------
From: 	Amy Fowler[SMTP:Amy.Fowler@Eng.Sun.COM]
Sent: 	Monday, February 05, 1996 3: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

home help back first fref pref prev next nref lref last post