this.parent = parent;
}
public void tableChanged(TableModelEvent event) {
PubsubTableModel dtm = parent.getTableModel();
PubSubManager pubsubMgr = parent.getPubsubMgr();
String jid = parent.getJID();
if (event.getType() == TableModelEvent.UPDATE) {
try {
Boolean sub = (Boolean) dtm.getValueAt(event.getFirstRow(), event.getColumn());
String nodeName = (String) dtm.getValueAt(event.getFirstRow(), 0);
Node node = pubsubMgr.getNode(nodeName);
if (sub.booleanValue()) { // contains the new value (soll)
node.subscribe(jid);
System.out.println(jid + " subscribed to " + node.getId());
} else {