public void actionPerformed(ActionEvent e) {	
			boolean valid = true; 	//used to keep track of whether all conditions are still valid
			String errorString = "";//used to keep track of all errors
			
			int ssNb = -1;
			try {
				ssNb = Integer.parseInt(snTextField.getText()); //read age from its text field, check if it is a valid number
			} catch(NumberFormatException error) {  //wasn't a valid number: age remains at -1
				errorString += Text.FORM_ERROR_ID + "\n\n"; //add error
				valid = false; //indicate we can't proceed				
			}	
						
			int age = -1;
			try {
				age = Integer.parseInt(ageTextField.getText()); //read age from its text field, check if it is a valid number
			} catch(NumberFormatException error) {  //wasn't a valid number: age remains at -1
				errorString += Text.FORM_ERROR_AGE + "\n\n"; //add error
				valid = false; //indicate we can't proceed				
			}		
								
			if (gender == 'x') { //gender hasn't been set yet (or this would be 'm' or 'f')
				errorString += Text.FORM_ERROR_GENDER + "\n\n"; //add error
				valid = false; //indicate we can't proceed
			}
								
			if (valid) { //student number, age, and gender are all set correctly: proceed
				Experiment.xp.processSsInfo(ssNb, age, gender);				
			} else {
				JOptionPane.showMessageDialog(null,errorString,"",JOptionPane.ERROR_MESSAGE); //something was not entered correctly: display error, and remain here
			}
		}