🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10742

Re: treecellrenderer problem

#10742
From: wim.van.leuven
Date: Tue, 17 Aug 1999 00:00
41 lines
1940 bytes
Hello,

you should try the reload() method on the tree's model after making
updates to the tree. This is a method defined at the level of
DefaultTreeModel.

Hope this helps,

Wim Van Leuven.



In article <37B1226E.BC286887@c-content.nl>,
  Marcel van den Dungen <info@c-content.nl> wrote:
> 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
>
>


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Technical Details
Message-ID: <7pbgpl$p8g$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37B1226E.BC286887@c-content.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,3ef674e222899baa
X-Google-Attributes: gid111d45,public
From: wim.van.leuven@watco.be
Subject: Re: treecellrenderer problem
Date: 1999/08/17
Message-ID: <7pbgpl$p8g$1@nnrp1.deja.com>
X-Deja-AN: 513739864
References: <37B1226E.BC286887@c-content.nl>
X-Http-Proxy: 1.0 x27.deja.com:80 (Squid/1.1.22) for client 193.74.148.90
Organization: Deja.com - Share what you know. Learn what you don't.
X-Article-Creation-Date: Tue Aug 17 11:24:43 1999 GMT
X-MyDeja-Info: XMYDJUIDvlv
Newsgroups: borland.public.jbuilder.java.swing
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)