CS130 - 3/18/2011

  1. biggest moon you've ever seen!
  2. Inputing a number from a TextField
    1. Assume you are going to store the number in a variable; say, int n;
    2. inTF.getText() returns a String, but Java only allows ints to be stored in int variables, so you must convert that String to an int, like this:
      int x;
      String s;
      s = inTF.getText();
      x = Integer.parseInt(s);
      Yes, it looks like "abracadabra", but that's how you do it!
  3. computing the sum of a series of input numbers
  4. Demos!