From Matthew.Holmes at students.wits.ac.za Sat Jul 27 20:38:26 2013 From: Matthew.Holmes at students.wits.ac.za (Matthew Holmes) Date: Sat, 27 Jul 2013 20:38:26 +0200 (SAST) Subject: [Aos] Missing code in lab manual In-Reply-To: <112083694.335126.1374949659101.JavaMail.root@students.wits.ac.za> Message-ID: <616985018.335195.1374950306272.JavaMail.root@students.wits.ac.za> Hi all, On page 18 of the lab manual under Step 6 there is code missing. Here is what Mike sent me: if(eve.target == inputField) { try { int age = Integer.parseInt(inputField.getText()); inputField.setText(""); if(age < PENSIONABLE_AGE) { throw new Exception("Exception: At age " + age + ", you do not yet qualify for a state pension"); } else { outputField.setText("At age " + age + ", you qualify for a state pension"); } } catch(Exception e) { outputField.setText(e.getMessage()); } } It's been tested and works fine. Cheers, Matthew.