public void deleteProduct(StockItem stockItem, ArrayList<StockItem> list) {

		// Get the value returned from the JOption Pane (tells which button has been pressed)
		// and handle it.
		int answer = JOptionPane.showConfirmDialog(null, "Do you really want to delete "
				+ stockItem.getProduct().getProductName() + "?", " CONFIRMATION ",
				JOptionPane.YES_NO_OPTION);
		if (answer == JOptionPane.YES_OPTION) {
			driver.getStockDB().removeProductFromStockList(stockItem);
		}
		if (list.size() > 0) {
			setTextField(0, list);
		}
		else {
			comboBox.setSelectedItem(null);
			clearTextFields(driver.getStockDB().getStockList());
			deleteProductButton.setEnabled(false);
			editProductButton.setEnabled(false);
			orderButton.setEnabled(false);
		}
		revalidate();
		repaint();
	}