private int validateUpdate()
	{
		try
	    {
			int sid;
		    int upc;
		    BigDecimal price;
		    int quantity;

		if (shipID.getText().trim().length() != 0)
		{
		    sid = Integer.valueOf(shipID.getText().trim()).intValue();
		} else {
			return VALIDATIONERROR;
		}

		if (itemUPC.getText().trim().length() != 0)
		{
		    upc = Integer.valueOf(itemUPC.getText().trim()).intValue();
		 
		    // check if shipItem exists
		    if (!shipItem.findShipItem(sid, upc))
		    {
		    	Toolkit.getDefaultToolkit().beep();
		    	mvb.updateStatusBar("ShipItem (" + sid + "," + upc + ") does not exist!");
		    	return OPERATIONFAILED; 
		    }
		}
		else
		{
		    return VALIDATIONERROR; 
		}

		if(supPrice.getText().trim().length() != 0 && isPrice(supPrice.getText().trim()))
		{
			price = BigDecimal.valueOf(Double.valueOf(supPrice.getText().trim()));
		}
		else
		{
			return VALIDATIONERROR;
		}
		
		if (itemQuantity.getText().trim().length() != 0 && isNumeric(itemQuantity.getText().trim()))
		{
		    quantity = Integer.valueOf(itemQuantity.getText().trim()).intValue();
		}
		else
		{
		    return VALIDATIONERROR; 
		}
		
		mvb.updateStatusBar("Updating shipItem...");

		if (shipItem.updateShipItem(sid, upc, price, quantity))
		{
		    mvb.updateStatusBar("Operation successful.");
		    showAllShipItems();
		    return OPERATIONSUCCESS; 
		}
		else
		{
		    Toolkit.getDefaultToolkit().beep();
		    mvb.updateStatusBar("Operation failed.");
		    return OPERATIONFAILED; 
		}
	    }
	    catch (NumberFormatException ex)
	    {
		// this exception is thrown when a string 
		// cannot be converted to a number
		return VALIDATIONERROR; 
	    }
	}