private void validateWidth() {
        
        boolean error = false;
        widthError.setText("");
                
        String widthInput = width.getText();
        if("".equals(widthInput))
        {
            error = true;
            widthError.setText("*the input cannot be empty!");
        }
        else
        {
            try {
            boxWidth = Double.parseDouble(widthInput);
            }
            catch (Exception e) 
            {
             //System.err.println(e);
             error = true;
             widthError.setText("*the width must be a float number!");
            }
        }
        if(error == false)
        {
            if(boxWidth < minWidth)
            {
                widthError.setText("*the width value must be greater than or equal with "+minWidth+" "+unitMeasure);
            }
            else
            if(boxWidth > maxWidth)
            {
                widthError.setText("*the width value must be less than or equal with "+maxWidth+" "+unitMeasure);
            }
        }
    }