public void actionPerformed(ActionEvent ae)
    {
      if(ae.getSource() == jRegisterPanel.getCancelButton())
      {
        setVisible(false);
        jLoginFrame.setVisible(true);
        dispose();
      }
      else if (ae.getSource() == jRegisterPanel.getRegisterButton())
      {
        String szEmail = jRegisterPanel.getEmailField();
        String szUsername = jRegisterPanel.getUsernameField();
        String szPasscode = jRegisterPanel.getPasscodeField();
        String szAnswer = jRegisterPanel.getSecurityAnswerField();
        String szQuestion = jRegisterPanel.getSecurityQuestionField();
        if(! (szEmail.isEmpty() || szUsername.isEmpty() || szPasscode.isEmpty() ||
              szAnswer.isEmpty() || szQuestion.isEmpty()) )
        {
          try
          {
            if(!ub.register(szUsername,szPasscode,
                            szEmail,szQuestion,
                            szAnswer))
              JOptionPane.showMessageDialog(null,"Account: "+szUsername+" already exists.","Duplicate Username",JOptionPane.INFORMATION_MESSAGE);
            else
            {
              JOptionPane.showMessageDialog(null,"Account: "+
                                            szUsername+" created successfully!");
              setVisible(false);
              jLoginFrame.setVisible(true);
              dispose();
            }
          }
          catch(IOException ioe)
          {
            JOptionPane.showMessageDialog(null,ioe.getMessage());
          }
        }
        else
          JOptionPane.showMessageDialog(null,"Registration fields can not be empty");
      }
    }