Article View: borland.public.jbuilder.java.swing
Article #922Re: Setting column titles in JTable, TableDialogEditDemo example
From: John McGrath [TeamB]
Date: Wed, 01 Dec 2004 02:05
Date: Wed, 01 Dec 2004 02:05
22 lines
1830 bytes
1830 bytes
On 11/29/2004 at 6:07:57 AM, Richard wrote:
> The answer to my own question: the labels are displayed by the
> JScrollPane rather than the JTable, and then only if the table is used
> when the JScrollPane is created:
To be a little more precise: The labels are displayed by a JTableHeader
component, which is created by the JTable (although you can provide your
own). *If* the JTable is placed in the JViewport of a JScrollPane, then
the JScrollPane will install the JTableHeader into the row header of the
JScrollPane. If you do not place the JTable in a JScrollPane, then the
JTableHeader is not automatically added to the UI. But if you want, you
can do that yourself.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<xn0dqe27g17u5no001@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41a8c0a1@newsgroups.borland.com> <41ab0304@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,2ec5ccf013472ede X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Subject: Re: Setting column titles in JTable, TableDialogEditDemo example Newsgroups: borland.public.jbuilder.java.swing References: <41a8c0a1@newsgroups.borland.com> <41ab0304@newsgroups.borland.com> User-Agent: XanaNews/1.16.5.2 Message-ID: <xn0dqe27g17u5no001@newsgroups.borland.com> X-Ref: newsgroups.borland.com ~XNS:00000086 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 NNTP-Posting-Host: 141.158.37.73 Date: 30 Nov 2004 19:05:29 -0700 X-Trace: newsgroups.borland.com 1101870329 141.158.37.73 (30 Nov 2004 19:05:29 -0700) Lines: 22 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail