private void validateQuantity() {
        
        boolean error = false;
        quantityError.setText("");
                
        String quantityInput = boxQuantity.getText();
        if("".equals(quantityInput))
        {
            error = true;
            quantityError.setText("*the input cannot be empty!");
        }
        else
        {
            try {
            quantity = Integer.parseInt(quantityInput);
            }
            catch (Exception e) 
            {
             //System.err.println(e);
             error = true;
             quantityError.setText("*the quantity must be a natural number!");
            }
        }
        if(error == false)
        {
            if(quantity < minQuantity)
            {
                quantityError.setText("*the quantity value must be greater than or equal with "+minQuantity);
            }
            else
            if(quantity > maxQuantity)
            {
                quantityError.setText("*the quantity value must be less than or equal with "+maxQuantity);
            }
        }
    }