private void btnCalculateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCalculateActionPerformed
        // TODO add your handling code here:
        //test if input is a float
        
        //validation for number entry; resets form if entry is not a numerical value
        boolean numberTest = MyUtils.isFloat(txtSalesAmount.getText()); 
        if  (numberTest == false) {
          txtSalesAmount.setText(""); 
          txtSalesAmount.requestFocusInWindow();
        } else {
           float salesValue = Float.parseFloat(txtSalesAmount.getText()); 
        //txtSalesAmount.setText("$" + salesValue); Deprecated formatting for the Sales Amount output
 
            txtSalesAmount.setText(MyUtils.moneyFormatting(salesValue)); 

            float commissionCalc = (MyUtils.calcCommission(salesValue));

           String commissionPercValue[] = {"3%", "6%", "8%", "10%"}; 

            if (salesValue < 200) {
                lblCommissionPerc.setText(commissionPercValue[0]); 
            } else if (salesValue >= 200 && salesValue < 500) {
                lblCommissionPerc.setText(commissionPercValue[1]);
            } else if (salesValue >=500 && salesValue < 1000){
                lblCommissionPerc.setText(commissionPercValue[2]);
            } else {
                lblCommissionPerc.setText(commissionPercValue[3]);
            }

            String commissionOutput = MyUtils.moneyFormatting(commissionCalc);


            //Original if-then structure to format the dollar figure output; decided to split it off into the moneyFormatting method in MyUtils()

            /**if (commissionCalc < 10) {
                commissionOutput = MyUtils.formatNum(commissionCalc,"0.00");
            } else if (commissionCalc >= 10 && commissionCalc < 100){
                commissionOutput = MyUtils.formatNum(commissionCalc,"00.00");
            } else if (commissionCalc >= 100 && commissionCalc < 1000){
                commissionOutput = MyUtils.formatNum(commissionCalc, "000.00");
            } else if (commissionCalc >= 1000 && commissionCalc < 10000){
                commissionOutput = MyUtils.formatNum(commissionCalc, "0000.00"); 
            } else if (commissionCalc >= 10000 && commissionCalc < 100000) {
                commissionOutput = MyUtils.formatNum(commissionCalc, "00000.00"); 
            } else if (commissionCalc >= 100000 && commissionCalc < 1000000){
                commissionOutput = MyUtils.formatNum(commissionCalc, "000000.00");
            } else if (commissionCalc >= 1000000 && commissionCalc < 10000000){
                commissionOutput = MyUtils.formatNum(commissionCalc, "0000000.00");
            }**/

            lblCommission.setText(commissionOutput);

            float salesTax = MyUtils.calcSalesTax(salesValue);
            String salesTaxString = MyUtils.moneyFormatting(salesTax);

            //Original if-then structure to format the dollar figure output; decided to split it off into the moneyFormatting method in MyUtils()
            /**if (salesTax < 10) {
                salesTaxString = MyUtils.formatNum(salesTax,"0.00");
            } else if (salesTax >= 10 && salesTax < 100){
                salesTaxString = MyUtils.formatNum(salesTax,"00.00");
            } else if (salesTax >= 100 && salesTax < 1000){
                salesTaxString = MyUtils.formatNum(salesTax, "000.00");
            } else if (salesTax >= 1000 && salesTax < 10000){
                salesTaxString = MyUtils.formatNum(salesTax, "0000.00"); 
            } else if (salesTax >= 10000 && salesTax < 100000) {
                salesTaxString = MyUtils.formatNum(salesTax, "00000.00"); 
            } else if (salesTax >= 100000 && salesTax < 1000000){
                salesTaxString = MyUtils.formatNum(salesTax, "000000.00");
            } else if (salesTax >= 1000000 && salesTax < 10000000){
                salesTaxString = MyUtils.formatNum(salesTax, "0000000.00");
            }**/ 

            lblSalesTax.setText(salesTaxString); 

            float totalPrice = MyUtils.calcFinalPrice(salesValue, commissionCalc, salesTax);
            lblTotal.setText(MyUtils.moneyFormatting(totalPrice)); 
        }
    }//GEN-LAST:event_btnCalculateActionPerformed