🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2990

Re: JTable Woes

#2990
From: Thomas Moore
Date: Mon, 15 Jun 1998 00:00
33 lines
2027 bytes
addColumn(String) actually gets resolved as addColumn(Object), which itself
is addColumn(Object, Vector), with this Vector being sent a null argument.  I
am guessing that the column name is just the toString() method of whatever
Object is in the column identifier.  I looked at the code again this weekend,
and I am going to try to see if setColumnIdentifiers(Object[]) works also.
The difference from the source seems to be that addColumn increments the
number of columns, whereas setColumnIdentifiers(Object[]) specificalls sets
numcolumns to the length of the Object array (or Vector).  I'm still not sure
why the constructor didn't set the table up properly, though.

Rashid420@my-dejanews.com wrote:

> I am having the same problem.
> I think I understand what you mean by "extending the DefaultModel".
> However, I cannot see any addCoumn() method that takes a string.
>
> If you could paste/mail some code, I would sure appreciate it.
>
> Thanks in advance
> Saurabh
>
> In article <357FDE1A.642C37C4@celwave.com>,
>   Thomas Moore <tmoore@celwave.com> wrote:
> >
> > Got it.  I found that the headers will only display properly if I do an
> > addColumn(String) explicitly (extending the DefaultTableModel).
> >
> > Thomas Moore wrote:
> ****deleted****
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/   Now offering spam-free web-based newsreading
Technical Details
Message-ID: <35853236.D1B71B62@celwave.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <357BDE6D.907F1905@celwave.com> <357FDE1A.642C37C4@celwave.com> <6ls48r$ikt$1@nnrp1.dejanews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,20949c9b5d80d5d0
X-Google-Attributes: gid1089d0,public
From: Thomas Moore <tmoore@celwave.com>
Subject: Re: JTable Woes
Date: 1998/06/15
Message-ID: <35853236.D1B71B62@celwave.com>
X-Deja-AN: 362836383
Content-Transfer-Encoding: 7bit
References: <357BDE6D.907F1905@celwave.com> <357FDE1A.642C37C4@celwave.com> <6ls48r$ikt$1@nnrp1.dejanews.com>
Content-Type: text/plain; charset=us-ascii
Organization: Celwave, Radio Frequency Systems, Inc.
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api