🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Gridbaglayout display issue

#368
From: Gillmer J. Derge [TeamB]
Date: Wed, 28 Sep 2005 13:54
39 lines
2800 bytes
Magnus wrote:
> What could have caused this to happen and what can I do to prevent this 
> and similar display "issues" in the future? Can this be caused by the 
> display setting for the computer. (WinXP)

Did he send you a screenshot?  The first thing I always wonder about 
when I get a bug report is how many vital details have been left out of 
the report because they're "obvious" to the tester.  It's rare that the 
number is zero.

For example, did he resize the window to an odd size?  Is he using a 
really huge or tiny font?  Is he using a strange color scheme that makes 
the combo box blend in with the background?  Is some other component 
sized strangely, making the grid cells the wrong size, and he didn't 
notice it?  These are all things that would hit you in a second with a 
screenshot but that your tester will probably never tell you.

Is he able to run the program in a way that opens a console window?  You 
might see some kind of exception backtrace that will help explain the 
problem and where it's occurring.

> Why only this box? I have other boxes that showed proper.
...
> panel1.add(comPortComboBox, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0
>       , GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
>       new Insets(28, 8, 0, 30), 14, -1));

Two things hit me at first glance.  First, you have fairly large insets, 
especially compared to the other component (all 0's).  Maybe the combo 
box is getting squeezed out and doesn't have room.  More likely it's the 
second issue though.

The last argument to the GridBagConstraints constructor is "ipady." 
You're passing -1.  The documentation doesn't explicitly prohibit 
negative values, but I doubt they're legal.  Try 0 or 1 and see if that 
works better.

-- 
Gillmer J. Derge [TeamB]
Technical Details
Message-ID: <433aa03d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <433a99e1$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,621c342b92c7ba27
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 28 Sep 2005 09:54:56 -0400
From: "Gillmer J. Derge [TeamB]" <spam@gillmerderge.com>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: Gridbaglayout display issue
References: <433a99e1$1@newsgroups.borland.com>
In-Reply-To: <433a99e1$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.149.56.207
Message-ID: <433aa03d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1127915581 24.149.56.207 (28 Sep 2005 06:53:01 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail