Complex Arithmetic Applet


This is an applet to do arithmetic with complex numbers using the Complex class.. This is altogether more straightforward than the Calculator in the book.


Notes: Layout Managers include GridLayout and BorderLayout.
This little utility class extracts a double from a TextBox (the 1.1 series jdk don't have a parseDouble method in Double). Note there is no error checking.

private double doubleVal(TextField t)  {
         return Double.valueOf(t.getText()).doubleValue();      
      }