Article View: borland.public.jbuilder.java.swing
Article #12550Re: JTable column resizing...
From: Nadia Akrour
Date: Tue, 22 Dec 1998 00:00
Date: Tue, 22 Dec 1998 00:00
36 lines
1986 bytes
1986 bytes
I answer my question myself. I simply have to call repaint() for the header of the jtable to make the change visible. Thanx for your help !! Nadia. Nadia Akrour wrote: > yes, the column header paint correctly when I minimize/restore the table. I > tried to call validate on the scrollpane but it does not work, the header > does not repaint. > > Matt Krevs wrote: > > > Does the column header paint properly once you have minimised/restored? I > > suspect so. > > > > If thats the case then call validate() for the JScrollPane that the table > > and table header have been added to. > > > > Nadia Akrour wrote in message <367E8EA9.D674A7DA@spring.fr>... > > >Hi all, > > >I have implemented a mouse listener on the table and on the double-click > > >the clicked column resizes itself. It calculates the new size of the > > >column as being the max value of the column header size and the cell > > >size. (according to the font size). The problem is that the column is > > >resized but the header is not. I have to scroll the table to see the > > >header resize itself. Has it something to do with the viewport, as the > > >header is not a part of the scrollable area ?? > > >I have tried validate() on the table header but it had no effect. > > >Please if you have any idea on how to do this tell me. > > >Thanx in advance. > > > > > >Nadia. > > >
Technical Details
Message-ID:
<367FB09C.6B1C66E4@spring.fr>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<367E8EA9.D674A7DA@spring.fr> <75mgcd$95j3@forums.borland.com> <367F61C3.474FD7D7@spring.fr>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,bd5e0357dd36e570 X-Google-Attributes: gid111d45,public From: Nadia Akrour <akrour@spring.fr> Subject: Re: JTable column resizing... Date: 1998/12/22 Message-ID: <367FB09C.6B1C66E4@spring.fr> X-Deja-AN: 424841230 Content-Transfer-Encoding: 7bit References: <367E8EA9.D674A7DA@spring.fr> <75mgcd$95j3@forums.borland.com> <367F61C3.474FD7D7@spring.fr> X-Accept-Language: fr-FR,en Content-Type: text/plain; charset=us-ascii Organization: SPRING TECHNOLOGIES Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing