java - How to update JTree elements -
i use jtree treenode extending defaultmutabletreenode.when add new node,i cant update jtree.any appreciated
adding node not enough, tree needs notified. correct way let model take care of adding/removing nodes, notify correctly tree on way.
in case of defaulttreemodel (which should 1 used in jtree if haven't made own treemodel), have method insertnodeinto(mutabletreenode newchild, mutabletreenode parent, int index), can use.
Comments
Post a Comment