🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #7903

Re: Changing Constraints at Runtime

#7903
From: John McGrath TeamB
Date: Sun, 26 Nov 2000 00:00
23 lines
1291 bytes
On Sat, 25 Nov 2000 19:39:41 -0600, Erik Berry wrote:

> Is it possible to change the constraints on a Component
> after it has been added to a Container (without removing
> and re-adding the Component)?  I'm using GridBagLayout,
> in case it matters.

Yes, it does matter, since the constraints are maintained by the 
LayoutManager, not the Component.  The LayoutManager and LayoutManager2 
interfaces do not provide a general way of changing the constraints, 
but GridBagLayout provides the following method:

    public void setConstraints( Component comp,
        GridBagConstraints constraints );

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.148abd33c079acda989d63@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <MPG.148a25d460ec3ce9989767@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,44fdec92cfe6dc75
X-Google-Attributes: gid111d45,public
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Subject: Re: Changing Constraints at Runtime
Date: 2000/11/26
Message-ID: <MPG.148abd33c079acda989d63@forums.borland.com>
X-Deja-AN: 697852429
References: <MPG.148a25d460ec3ce9989767@newsgroups.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing