package class3_3_Loops; import javax.swing.JOptionPane; public class HandlingCancel { public static void main(String[] args) { String radiusStringCm = JOptionPane.showInputDialog( "Please enter the radius (cm):"); double radiusCm = Double.parseDouble(radiusStringCm); double areaCm2 = Math.PI * radiusCm * radiusCm; JOptionPane.showMessageDialog(null, "You entered: " + radiusStringCm + "\nThe area is: " + areaCm2 + " cm^2"); } }