private double getCustomWidth() {
        try {
            final String widthText = widthBox.getText().replace("cm", "");
            return Double.parseDouble(widthText);
        } catch (NumberFormatException e) {