Article View: borland.public.jbuilder.java.swing
Article #11353Re: JTable Columns
From: Quach Hoa Thanh
Date: Mon, 14 Jun 1999 00:00
Date: Mon, 14 Jun 1999 00:00
34 lines
1781 bytes
1781 bytes
Thanks Steve for the help. I certainly will try it inside the JScrollPane. I will let you know of the result. Thanh Steve Horsley wrote: > 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:
<37657039.C7B77F6F@ns.sympatico.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3763E235.80724A4@ns.sympatico.ca> <3764C6B6.8F6FF6EE@cwcom.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,eb4b6527d333ff79 X-Google-Attributes: gid111d45,public From: Quach Hoa Thanh <thq.qua@ns.sympatico.ca> Subject: Re: JTable Columns Date: 1999/06/14 Message-ID: <37657039.C7B77F6F@ns.sympatico.ca> X-Deja-AN: 489583989 Content-Transfer-Encoding: 7bit References: <3763E235.80724A4@ns.sympatico.ca> <3764C6B6.8F6FF6EE@cwcom.co.uk> Content-Type: text/plain; charset=us-ascii Organization: Self Employed Mime-Version: 1.0 Reply-To: thq.qua@ns.sympatico.ca Newsgroups: borland.public.jbuilder.java.swing