🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JTable Columns

#11346
From: Steve Horsley
Date: Mon, 14 Jun 1999 00:00
27 lines
1560 bytes
1: The column name code looks OK to me. I just did a JTable like this
last week, and the column names appeared OK. However - I put the 
JTable inside a JScrollPane, and I got the impression that it was the 
JScrollPane that was displaying the column names - the names didn't
scroll with the table data. It looked neat! Give it a try.

2: The Sun documentation suggests that is is the AbstractTableModel
that you should be overriding anyway. If it works, be happy.

Steve
//-----------------------------------------------

Quach Hoa Thanh wrote:
> 
> I have two problems with the above code and I still don't know why.
> 
> 1. JTable displays values in the cell from the two dimensional array.
> But it didn't show any columns title at all even though the code tells
> it to do so.
> 
> 2. DefaultTableModel is a subclass of AbstractTableModel. For some
> reasons, it blows up when I try to use it. AbstractTableModel works out
> beautifully.
> 
> Thanks for all your helps.
> 
> Thanh
Technical Details
Message-ID: <3764C6B6.8F6FF6EE@cwcom.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3763E235.80724A4@ns.sympatico.ca>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,eb4b6527d333ff79
X-Google-Attributes: gid111d45,public
From: Steve Horsley <steve.horsley@cwcom.co.uk>
Subject: Re: JTable Columns
Date: 1999/06/14
Message-ID: <3764C6B6.8F6FF6EE@cwcom.co.uk>
X-Deja-AN: 489372258
Content-Transfer-Encoding: 7bit
References: <3763E235.80724A4@ns.sympatico.ca>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Cable & Wireless Communications
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing