Hi,
is it possible to temporarily disable that a component updates itself
on the screen? I'm building up a JTree step by step (in a timer), and
each time an element is updated, the screen updates. But I want to
create the entire tree and then update the screen.
Is there a general mechanism to do so? I can imagine workarounds for
JTree, e.g., build a subtree and then add the entire subtree to the
tree.
Thanks,
Markus
Markus L?ffler - 31 Mar 2004 21:06 GMT
Actually, I found that the tree is not updated on the screen if I add
to the DefaultTreeModel, only after I do
d_tree.scrollPathToVisible(new TreePath(newNode.getPath()));
That answers my question but brings up new questions. Why doesn't
DefaultTreeModel.insertNodeInto() update the screen, as I read in many
newsgroup posts?
Why doesn't d_tree.scrollRowToVisible() doesn't work either, when it
scrollPathToVisible is replaced by it?
Thanks,
Markus