Just to understand your case scenario, are you running this case between two clients? I mean, are you removing the entry in one XMPP client and “hoping” to have the other client updated? Or are you running the whole case in one client?
In either case, after an entry is deleted you don’'t have to update the roster. Smack will update the roster automatically.
but the roster entry that i deleted is still in my
list… i can see him…(i have a roster jtree)…
May be the problem is that the view (jtree) is not being refreshed? If you are running the case between two clients you can open a debugger to check if your remote client is receiving a roster update.
i run the program on one client to view my roster.
i have a setroster procedure which …
roster=connection.getroster();…
and then i build the tree from the begining…
i always put…
tree=null;
and built the tree from the top with the update roster
(after i did roster=connection.getroster())
but i dont see it on the tree, but the changes were happened, because when i change a group name… i dont see the change on the tree, but when i transfer one entry from one group to another… i see that the groupname is changed…
that makes me crazy… because
all i use is… roster.getgroups()…
and the groups name are updated…
but on the tree i also do this line roster.getgroups…
but in this case i dont see the new name of the group… unless i do something else…
i think its a problem of thread in smack implementation
Massive disclaimer: I haven’'t done any substantial GUI work.
Can you update the existing JTree instead of nulling it out and making a new one? I’'m not sure that the reference to the original one (with the old content) stored in the pane would go away and then be updated just because you assign null to and then rebuild the object in your procedure. That sort of thing has bitten me before.