🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19074

GridBagLayout Problem

#19074
From: Howard Weiner
Date: Thu, 12 Mar 1998 00:00
25 lines
1498 bytes
I have an application that displays a dialog box with a series of field
label/text field (and textarea) pairs. The frame itself is managed by the
FlowLayout manager. The field labels are added to a panel managed by the
GridBagLayout, and the text fields are added to another panel managed by the
GridBagLayout.

Both "columns" appear as expected. The labels match up with the text
fields....except when the last text field is replaced by a text area. Then a
strange thing happens. The labels appear CENTERed within the column, and no
longer line up on the same horizontal axis as their corresponding text
fields and text area.

First question: Why does one panel (for labels), managed by its own instance
of a GridBagLayout and GridBagConstraints effected by another with its own
instance set (text fields and text area)?

Second question: Is this a language bug?

Third question: Can anyone suggest a work-around other than replacing the
text area with a text field--which, by the way, makes the problem go away?

TIA

HDW
Technical Details
Message-ID: <6e9auk$dlr3@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,5e716734f488574d,start
X-Google-Attributes: gidf74b3,public
From: "Howard Weiner" <HDWeiner@erols.com>
Subject: GridBagLayout Problem
Date: 1998/03/12
Message-ID: <6e9auk$dlr3@forums.borland.com>
X-Deja-AN: 333415845
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language