String nick = txtNick.getText();
if (nick.equals("")) nick = contact.getUser();
//still empty then use domain
if (nick == null) nick = contact.getDomain();
RosterBuilder rb = new RosterBuilder();
RosterItemBuilder rib = new RosterItemBuilder();
rib.addGroup((String) cmbGroup.getSelectedItem());
rib.jid = contact;
rib.name = nick;
rib.ask = "subscribe";
rb.addItem(rib.build());
InfoQueryBuilder iqb = new InfoQueryBuilder();
iqb.addExtension(rb.build());
iqb.setType("set");
backend.send(iqb.build());
} catch (InstantiationException e2)