Article View: borland.public.jbuilder.java.swing
Article #10039Re: JTable doesn't show header?
From: Robert L. White
Date: Wed, 24 Nov 1999 00:00
Date: Wed, 24 Nov 1999 00:00
32 lines
1991 bytes
1991 bytes
Wendy's answer is right on. JTable is pretty worthless outside of a JScrollPane and the connection between the two is not really obvious. From the documentation, I thought adding JTable to a JScrollPane was an added feature that I didn't want to experiment with until I got my JTable configured correctly. Also, the effects of JScrollPane on the JTable it contains are significant -- beyond just scrolling. There is the way the ScrollPane handles the headers (column header AND row header), but also the sizing of column widths. I would make the first sentence of the JTable docs say, "This control is best used inside of JScrollPane" -- in boldface. ..Bob. Henrik G๏ฟฝransson <i95_gok@i.kth.se> wrote in message news:81f3eo$i48@forums.borland.com... > I've been trying to use a JTable in my application, but can't work out how > to get the table to show it's header. Not even the simplest table will do > this. > > In examples I've been looking at there aren't many comments about this and > it seems like the JTable will show it's header by default, but mine won't > however I try. Whether the columnNames are given by default or set by me, > the method getColumnName seems to return a correct value. > > Is there some major point I've overlooked? I would be very grateful if > someone could help me with this problem, I've really tried everything I can > think of. > > Thanks for your response on advance. > /Henrik Goransson > >
Technical Details
Message-ID:
<81hms3$lkp11@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<81f3eo$i48@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,8ccede5a30480efd X-Google-Attributes: gid111d45,public From: "Robert L. White" <rlwsoftware@netscape.net> Subject: Re: JTable doesn't show header? Date: 1999/11/24 Message-ID: <81hms3$lkp11@forums.borland.com> X-Deja-AN: 552681141 References: <81f3eo$i48@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: RLW Software X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing