Article View: borland.public.jbuilder.java.swing
Article #10795treecellrenderer problem
From: Marcel van den Dungen
Date: Wed, 11 Aug 1999 00:00
Date: Wed, 11 Aug 1999 00:00
20 lines
1312 bytes
1312 bytes
hi i am using a jtree. for it i have implemented my own TreeCellRenderer which extends the JPanel class. The size of the cells depends on the visual size of the JTree, i want to avoid horizontal scrolling. The problem is that whenever the size of the tree changes the cells are not rendered again the way i want them to. they are repainted, but not resized. once they are collapsed or something they are resized and repainted again. i think the problem is that the JTree never calls the cells getPreferredSize method. does anyone know how to make cells in a JTree dynamic of size. i think the tree must be drawn from scratch again everytime it is resized or a call the cells getPreferredSize must be forced. i dont no how to do either of these. can anyone please help me out here? thanks in advance greetings casper
Technical Details
Message-ID:
<37B1226E.BC286887@c-content.nl>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,3ef674e222899baa,start X-Google-Attributes: gid111d45,public From: Marcel van den Dungen <info@c-content.nl> Subject: treecellrenderer problem Date: 1999/08/11 Message-ID: <37B1226E.BC286887@c-content.nl> X-Deja-AN: 511363862 Content-Transfer-Encoding: 7bit Organization: C-CONTENT b.v. Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing