Hi, why doesn't this work?
import java.awt.Container; import javax.swing.JApplet; import javax.swing.JOptionPane; import javax.swing.JTextArea; public class CylinderApplet extends JApplet { public void init() { String radiusStr = null ; String heightStr = null; double volume = 0; double radius= Double.parseDouble(radiusStr); double height= Double.parseDouble(heightStr); JTextArea outputArea= new JTextArea(); Container container =getContentPane(); container.add(outputArea); for (int i = 1; i <= 5; i++ ){ radiusStr = JOptionPane.showInputDialog("Enter in the radius here"); heightStr = JOptionPane.showInputDialog("Enter in the radius here"); outputArea.setText("The Volume of the Cylinder is" +volume); } } public double myvolume (double radius, double height) { double volume; volume= Math.PI*radius*radius*height; return volume; } // end of method } // end of volume class