πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2107

Re: Special format for JTable column Header

#2107
From: Gerard BUNEL
Date: Fri, 15 Jun 2001 12:51
49 lines
2963 bytes
I think you should use a Specialized TableCellRenderer for your Table
Header

Laurent Souriau a οΏ½crit :

>         Hi,
>
> I currently have the following problem :
>
> I have a Jtable with a DefaultTableModel(),
>
> I pass a list of values and of columnnames by :
>
>  myModel = new defaultTableModel(data, columnNames);
>  table.setModel(myModel);
>
> Then the columnames content is :
>
> "Date"  "VLR / SFR" "VLR / ITINERIS" "VLR / MOBISTAR"
>
> It appears like above in my column headers.
>
> I would like the headers to appear like this :
>
> Date     VLR     VLR            VLR
>               SFR     ITINERIS    MOBISTAR
>
>  I tried to  fill the columnnames content with :
>
> "Date"  "VLR \n SFR" "VLR \n ITINERIS" "VLR \n MOBISTAR"
>
> But it doesn't produce what i want ( i have a carriage return character
> instead
> of appearing in 2 lines.
>
> any help would be greatly appreciated.
>
> Laurent
> e-mail : lsouriau@club-internet.fr

--
gerard.bunel@ago.fr - Atlantide - http://www.ago.fr/atlantide/
Technopole Brest Iroise BP 80802 - Site du Vernis - 29608 Brest cedex -
France
Tel. : +33 2 98 05 43 21 - Fax. : +33 2 98 05 20 34
e-mail: atlantide-brest@ago.fr
Centre Affaires Oberthur - 74D, rue de Paris -  35700 Rennes - France
Tel. : +33 2 99 84 15 84 - Fax : +33 2 99 84 15 85
e-mail: atlantide-rennes@ago.fr
Technical Details
Message-ID: <3B2A04DD.6AC841FE@ago.fr>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!freenix!fr.usenet-edu.net!usenet-edu.net!oleane.net!oleane!nnrp.oleane.net!not-for-mail
References: <9gcvcu$8kp$1@s1.read.news.oleane.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10568c,967d0259ba18d10e
X-Google-Attributes: gid10568c,public
X-Google-Thread: 1089d0,967d0259ba18d10e
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f74b3,967d0259ba18d10e
X-Google-Attributes: gidf74b3,public
X-Google-Thread: 10a146,967d0259ba18d10e
X-Google-Attributes: gid10a146,public
X-Google-Thread: f631b,967d0259ba18d10e
X-Google-Attributes: gidf631b,public
X-Google-Thread: 113ae9,967d0259ba18d10e
X-Google-Attributes: gid113ae9,public
X-Google-ArrivalTime: 2001-06-15 05:55:03 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!freenix!fr.usenet-edu.net!usenet-edu.net!oleane.net!oleane!nnrp.oleane.net!not-for-mail
From: Gerard BUNEL <gerard.bunel@ago.fr>
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,comp.lang.java.help,comp.lang.java.programmer,de.comp.lang.java,fr.comp.lang.java
Subject: Re: Special format for JTable column Header
Date: Fri, 15 Jun 2001 14:51:41 +0200
Organization: Guest of France Telecom Oleane's newsreading service
Lines: 51
Message-ID: <3B2A04DD.6AC841FE@ago.fr>
References: <9gcvcu$8kp$1@s1.read.news.oleane.net>
NNTP-Posting-Host: kelenn.ago.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: s1.read.news.oleane.net 992609433 9554 195.101.195.163 (15 Jun 2001 12:50:33 GMT)
X-Complaints-To: abuse@oleane.net
NNTP-Posting-Date: Fri, 15 Jun 2001 12:50:33 +0000 (UTC)
X-Mailer: Mozilla 4.7 [fr] (WinNT; I)
X-Accept-Language: fr