Re: Dynamically adding nodes without a TreeModel



You must either use DefaultTreeModel.insertNodeInto() event or fire the
fireTreeNodesInserted() event.

- Raja.

Srikanth wrote:
> Hi,
>
> I am adding nodes dynamically after the tree is visible. It's adding
> the first child node I create and it is showing it. When I add a second
> node, it doesn't show the that. And when I debug the code I found that
> the node was added to the tree but it is not visible. I tried by
> expanding and collapsing the tree manually, but it didn't work.
>
> I am not using any TreeModel as such. So, how do I make the change
> visible??? I am even calling the repaint() method of JTree, what could
> be the problem and is it better if I create my own TreeModel class and
> use it???
>
> Thank you,
> Srikanth...

.