TableItem[] items = table.getItems();
for (TableItem tableItem : items) {
int goodInTableId = Integer.parseInt(tableItem.getText(0));
if (id == goodInTableId) {
ClientCacheController controller = ClientCacheController.getInstance();
GoodObject object = controller.lookForGoodDetail(id);
double p = num * object.getPrice();
tableItem.setText(1, Integer.toString(num));
tableItem.setText(3, Double.toString(p));
break;
}
}