Article View: borland.public.jbuilder.java.swing
Article #7764Re: JTable in JScrollPane question
From: John McGrath TeamB
Date: Fri, 15 Dec 2000 09:54
Date: Fri, 15 Dec 2000 09:54
24 lines
1639 bytes
1639 bytes
On Thu, 14 Dec 2000 20:36:45 -0500, Greg Tomalesky wrote:
> I noticed that when a JTable is contained in a JScrollPane, it
> automatically gets column header labels. Is there any way to turn them
> off. I still need the be able to scroll the table but I don't need
> column headers.
I have never done this, but you could try:
Override getTableHeader() in your JTable and return null, or possibly a
dummy component if that does not work.
Or you could try doing a setRowHeaderView(null) on the JScrollPane.
But this will have to be done after the header is installed into the
JScrollPane, and I am not sure when that happens.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.14a3b22352856780989dc4@forums.borland.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!not-for-mailReferences:
<3A3975AD.9D78C649@nfdc.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,23e27e52a27dab1a X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2000-12-15 02:02:03 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!not-for-mail From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.swing Subject: Re: JTable in JScrollPane question Date: Fri, 15 Dec 2000 04:54:56 -0500 Organization: Another Netscape Collabra Server User Lines: 24 Message-ID: <MPG.14a3b22352856780989dc4@forums.borland.com> References: <3A3975AD.9D78C649@nfdc.net> NNTP-Posting-Host: dslcv1-60.fast.net X-Newsreader: MicroPlanet Gravity v2.30