Article View: borland.public.jbuilder.java.swing
Article #9129Re: JTabe column autoresize
From: Greg Hamer
Date: Mon, 15 May 2000 00:00
Date: Mon, 15 May 2000 00:00
21 lines
1288 bytes
1288 bytes
One way to do this is to add a component listener to the JScrollPane that holds the JTable and on componentResized, compare the new size of the JScrollPane with the preferredSize of the JTable, and then set the tables autoResizeMode as desired. Ilia Gilderman <ilia@iphighway.com> wrote in message news:391c7506@dnews... > Hi. > > I would like to setup the JTable colums in the following way: > When the total column width is less than table size adjust the last column > like in AUTO_RESIZE_LAST_COLUMN policy, but when total width of the columns > is grater than table width I want to see the horizontal scollbar like in > AUTO_RESIZE_OFF policy. > Is it any way to combine these two styles? > > Ilia Gilderman > > ilia@iphighway.com > >
Technical Details
Message-ID:
<8fp9th$b604@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<391c7506@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,df1554f87f1e71fa X-Google-Attributes: gid111d45,public From: "Greg Hamer" <ghamer@corp.netzero.net> Subject: Re: JTabe column autoresize Date: 2000/05/15 Message-ID: <8fp9th$b604@bornews.borland.com> X-Deja-AN: 623685390 References: <391c7506@dnews> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing