🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Max Element Error in JBuilder4

#8163
From: Sam King
Date: Wed, 18 Oct 2000 00:00
70 lines
3471 bytes
There appears to be something wrong with JBuilder4
when it comes to the number of elements you can put
into containers or panels or frames.

I have a class, part of a large program, that runs
fine under JBuilder3.  It has a JDesktop, it calls
a class that installs a JInternalFrame, then a JPanel,
and then it adds 16 JLabels and 16 JFields and a
couple buttons.
Under JBuilder4, the JPanel shows up empty.

After playing with it, looking for any differences
with a couple of new texts on the JDK 1.3, I found
nothing wrong and I could not make it work under
JBuilder4.

So, assuming that the JDK 1.3 had somehow invalidated
the null layout or absolute positioning that my class
used, I set about testing a replacement "Box" layout
system directly for a new JDK 1.3 text book, "Java 2,"
by Ivor Horton.  If you have the text, please look on
pages 556 through 563.  Therein is a description of a
BoxLayout Manager.  The program works fine.

Now comes the problem.  I started adding JLabels to
the left box and JFields to the right box.  The program
functions fine, until say 3 JLabels and JFields are
added.  Then when the 4th JLabel or JField is added,
the JPanels holding the Boxes comes up empty.  If you
remove that 4th JLabel or JField, the program functions
normally.  Also, if you maximize the JFrame, the JFields
and JLabels are there.  Then if you reduce the JFrame
back to normal they are still there, like there should
have been when the program first ran.

It sounds like there is something wrong with the way I
created those last two fields or labels.  That is what
I thought, but there is nothing wrong with them.

Here is what I did; there are two other boxes in the
program that hold some RadioButtons and CheckBoxes that
I don't want, so I removed both of those boxes.  Now my
4th JLabel and JField work fine. In fact I went on to add
all 16 JLabels and JFields.  The program works fine.

Now I am curious so I added back one of the boxes that
contain the RadioButtons.  The program doesn't work.  It
comes up with an empty JPanel.  So, leaving in the Radio-
Button box I started removing my JLabels and JFields.
When a certain number are removed, the program starts
working again.  If you take out the RadioButton Box and
put in the Checkbox Box then you have to remove a
different number of JLabels and JFields.

Also, there is plenty of room in the JPanels to hold
everything.  It appears to me that there is some sort
of erroneous restriction on the number of elements you
can put into the containers.  That is an error in
JBuilder4 that does not exist in JBuilder3.

Note, this problem exist in two different programs,
using two entirely different type of containers.

If you want the code, I'll post it, but you might want
to start with the small program on page 556 of "Java 2"
by Horton.

Regards

Sam C. King
Technical Details
Message-ID: <39EE47D3.B9E6EE3E@home.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: 111d45,69b62d3f7f94c109,start
X-Google-Attributes: gid111d45,public
From: Sam King <alt5236ez@home.com>
Subject: Max Element Error in JBuilder4
Date: 2000/10/18
Message-ID: <39EE47D3.B9E6EE3E@home.com>
X-Deja-AN: 683126528
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 18 Oct 2000 17:51:02 -0800, 24.16.254.225
Organization: @Home Network
MIME-Version: 1.0
Reply-To: alt5236ez@home.com
Newsgroups: borland.public.jbuilder.java.swing