title: Alternative to JOptionPane?
body: <p>It works, but I need an alternative to the JOptionPane. This is a homework assignment and we are not allowed to use JOptionPane. Here is what I have, which works, it just isn't what the instructor wants.</p>
  
  <pre><code>import java.awt.*;
  import javax.swing.*;
  @SuppressWarnings("serial")
  public class calc extends JApplet {
  
      double sum;
      double product;
      double difference;
      double quotient;
  
      public void init() {
          String firstNumber = JOptionPane.showInputDialog("Enter the first number");
          String secondNumber = JOptionPane.showInputDialog("Enter the second number");
          String thirdNumber = JOptionPane.showInputDialog("Enter the third number");
          double number1 = Double.parseDouble(firstNumber);
          double number2 = Double.parseDouble(secondNumber);
          double number3 = Double.parseDouble(thirdNumber);
          sum = number1 + number2 + number3;
          product = number1 * number2 * number3;
          difference = number1 - number2 - number3;
          quotient = number1 % number2 % number3;
      }
  
      public void paint(Graphics g) {
          super.paint(g);
          g.drawRect(15, 10, 270, 60);
          g.drawString("Sum "+sum, 25, 25);
          g.drawString("Product "+product, 25, 35);
          g.drawString("Difference "+difference, 25, 45);
          g.drawString("Quotient "+quotient, 25, 55);
      }
  }
  </code></pre>