Article View: borland.public.jbuilder.java.swing
Article #12814jtable,sizing column headers
From: paul.brasted
Date: Tue, 03 Nov 1998 00:00
Date: Tue, 03 Nov 1998 00:00
23 lines
1563 bytes
1563 bytes
I am trying to resize column headers under jbuilder2 using the following code
for (int i=0; i<tableView.getColumnModel().getColumnCount(); i++)
{
tableView.getColumnModel().getColumn(i).setMaxWidth(300);
tableView.getColumnModel().getColumn(i).setMinWidth(150);
tableView.getColumnModel().getColumn(i).setWidth(150);
};
When done under the constructor of my class this does absolutly nothing.
If I perform this code under a button press after the display has finished
and then issue a fireTableDataChanged() then the table changes size correctly,
the scroll bars appear correctly but the table headers do nothing until I
click on them with the mouse. I want though to change the size before display
but this is intresting
Thanks for any help
Paul
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<71n80g$bpu$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,9bb6198bd8919ddc,start X-Google-Attributes: gid111d45,public From: paul.brasted@roadrunner.uk.com Subject: jtable,sizing column headers Date: 1998/11/03 Message-ID: <71n80g$bpu$1@nnrp1.dejanews.com> X-Deja-AN: 407933319 X-Http-Proxy: 1.0 x11.dejanews.com:80 (Squid/1.1.22) for client 193.133.123.38 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Nov 03 15:37:52 1998 GMT Newsgroups: borland.public.jbuilder.java.swing X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)