int c = 0;
Iterator groups = entry.getGroups();
while (groups.hasNext()) {
RosterGroup g = (RosterGroup) groups.next();
if(!g.contains(entry)) continue;
g.removeEntry(entry);
c++;
}
buddy.setTempGroup(groupName);
SwingUtilities.invokeLater(new Runnable()