Next time, it would be good if you show us your sourceode. Then we can say you what the misstake is and how to resolve it.
If you have a TreeTable then you can remove all items with removeAllItems() or single items with removeItem(Object)
Now, if you add a item on the TreeTable, you have to give this item a itemID what you can use later to find this again and delete this item.
final TreeTable treeTable = new TreeTable();
//...
treeTable.addItem(new Object[]{"value", "value", "value"}, 0);
treeTable.addItem(new Object[]{"value", "value", "value"}, 1);
treeTable.addItem(new Object[]{"value", "value", "value"}, 2);
//...
treeTable.removeItem(1);
This very small example will create 3 Items in the your treeTable with the ID´s 0, 1 and 2. After this it delete the Item with the ID 1.
You can find here the Documentation about TreeTable and the method removeItem().