private void btnCalculateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCalculateActionPerformed
        // TODO add your handling code here:
  
        //Declare variables 
        double length = 0; 
        double width = 0; 
        double height = 0;
        double radius = 0; 
        double volume = 0; 
        int shapeIndexValue = cboShapeType.getSelectedIndex();
        
        //Get values from textbox entries: 
        
        
        
        
        if (shapeIndexValue == 0) {
            //BOX SHAPE
            length = Double.parseDouble(txtLength.getText()); 
            width = Double.parseDouble(txtWidth.getText());
            height = Double.parseDouble(txtHeight.getText()); 
            
            volume = height * length * width; 
            
            //volume = MyUtils.formatNum((float) volume, "#.##");
            //lblVolume.setText(Double.toString(volume));
        } else if (shapeIndexValue == 1) {
            //CYLINDER SHAPE
            height = Double.parseDouble(txtHeight.getText()); 
            radius = Double.parseDouble(txtRadius.getText());
          
            volume = Math.PI * radius * radius * height; 
            //lblVolume.setText(Double.toString(volume)); 
        } else if (shapeIndexValue == 2) {
            //CONE SHAPE 
            height = Double.parseDouble(txtHeight.getText()); 
            radius = Double.parseDouble(txtRadius.getText()); 
            
            volume = (Math.PI * radius * radius * height)/3f; 
             
            //lblVolume.setText(Double.toString(volume));
        } else if (shapeIndexValue == 3){
            //SPHERE SHAPE
         
            radius = Double.parseDouble(txtRadius.getText()); 
            
            volume = (4f/3f) * Math.PI * radius * radius * radius; 
            //
        } else {
            //nothing selected. Time for an error message. 
             lblVolume.setText("Try again.");
        }
        //display the volume
        
        lblVolume.setText(Double.toString(volume) + " cubic inches");
    }//GEN-LAST:event_btnCalculateActionPerformed