public void personDetailsForm() {
		// Initially clear the text fields
		name = null;
		email = null;
		contactNumber = null;
		address = null;

		errorMessage = "";

		// Name field
		if (!nameField.getText().equals("")) {
			name = nameField.getText();
			nameLabel.setForeground(Color.black);
		}
		else {
			errorMessage = errorMessage + "Name field cannot be empty!\n";
			nameLabel.setForeground(Color.red);
		}

		// Email field
		if (!emailField.getText().equals("")) {
			email = (emailField.getText());
			emailLabel.setForeground(Color.black);
			if (!RetailSystemDriver.validateEmail(email)) {
				email = null;
				errorMessage = errorMessage
						+ "\nInvalid email address!!\nValid format is john.dough@example.com";
				emailLabel.setForeground(Color.red);
			}
		}
		else {
			errorMessage = errorMessage + "Email field cannot be empty!\n";
			emailLabel.setForeground(Color.red);
		}

		// Contact number field
		if (!contactNumberField.getText().equals("")) {
			contactNumber = (contactNumberField.getText());
			contactNumberLabel.setForeground(Color.black);

			/* try { */
			// Integer.parseInt(contactNumber);
			/*
			 * } catch (NumberFormatException e) { errorMessage = errorMessage
			 * +"\nInvalid phone number!!\nOnly numbers are allowed!"; e.printStackTrace(); }
			 */
			if (!RetailSystemDriver.validateContactNumber(contactNumber)) {
				contactNumber = null;
				errorMessage = errorMessage
						+ "\nInvalid phone number!!\nValid format is 0xxxxxxxxx\nOnly numbers are allowed!";
				contactNumberLabel.setForeground(Color.red);
			}
		}
		else {
			errorMessage = errorMessage + "Contact number field cannot be empty!\n";
			contactNumberLabel.setForeground(Color.red);
		}

		// Address field
		if (!addressField.getText().equals("")) {
			address = (addressField.getText());
			addressLabel.setForeground(Color.black);
		}
		else {
			errorMessage = errorMessage + "Address field cannot be empty!\n";
			addressLabel.setForeground(Color.red);
		}
	}