I am very to new to Java programming and I am taking a class based on Java. I am currently doing this coffee project which is based on boolean and RadioButtons. I believe I am almost done with it except I get this error message on the console. If there is any other mistakes please let me know so I can fix it!
Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "1 "
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
    public void purchase()
    {
        //local variables
        String  quantityString, buttonString, nameString, coffeeType;
        float subTotalFloat, priceFloat, taxFloat, grandTotalFloat;
        int quantityInteger;
        //Format the values to currency format
        DecimalFormat valueDecimalFormat = new DecimalFormat("$#0.00");
        //retrieve the input from the  user
        nameString = nameTextField.getText();
        quantityString = quantityTextField.getText();
        buttonString = coffeeType ();
        //change data types
        quantityInteger = Integer.parseInt(quantityString);
        ...
    }