public void refreshTab(int index) {
		if (index > -1) {
			if (itemsPrice.size() > 0)
				priceField.setText(formatter.format(itemsPrice.get(index)));
			quantityTextField.setText("1");
			if (itemsQuantity.size() > 0) {
				availableQuantityField.setText(Integer.toString(itemsQuantity.get(index)));
				grandTotalField.setText(formatter.format(grandTotal));
				productComboBox.setSelectedIndex(index);

				if (supplierComboBox.getSelectedIndex() != 0) {
					supplierIDField.setText(Integer.toString(driver.getPersonDB().getSupplierList()
							.get((supplierComboBox.getSelectedIndex() - 1)).getId()));
				}
			}
			if(productComboBox.getSelectedItem()!=null)
				if(driver.getStockDB().getProductByName(productComboBox.getSelectedItem().toString())!=null){
					availableQuantityField.setText(""+driver.getStockDB().getProductByName(productComboBox.getSelectedItem().toString()).getQuantity());
					priceField.setText(""+driver.getStockDB().getProductByName(productComboBox.getSelectedItem().toString()).getProduct().getSupplierPrice());
				}
				else{
					availableQuantityField.setText("0");
					priceField.setText("0.00");
				}
		}
		revalidate();
		repaint();
	}