Smack API - How to display loop jxTaskpane for expand and collapse roster list

Posted by MYE on Stack Overflow See other posts from Stack Overflow or by MYE
Published on 2011-01-09T04:04:01Z Indexed on 2011/01/09 11:53 UTC
Read the original article Hit count: 282

Filed under:
|

Hello everybody ! i have problem to display Taskpane for loop. i have a code to get the groups of roster (Groups : Friends - Business - Company, so on) my code is :

Roster rost = xmppcon.getRoster();
Collection<RosterGroup> groups = rost.getGroups();

 for(RosterGroup group : groups){
            DefaultListModel model = new DefaultListModel();
            model.addElement(group.getEntries());
            String GroupNameCount = group.getName() + "("+group.getEntryCount()+")";
            jXTaskPane1.setTitle(GroupNameCount);
            jXList1.setModel(model);

        }

but jxTaskpane not loop, but when i print group name it print 2 line (because in database user A have two group is Friends and NIIT)

sample print

System.out.println(group.getName());

result:

Friends




NIIT

© Stack Overflow or respective owner

Related posts about java

Related posts about smack