Exemplo n.º 1
0
 /**
  * Creates a new UserRegistrationDialog object.
  *
  * @param panel DOCUMENT ME!
  * @param m DOCUMENT ME!
  */
 public UserRegistrationDialog(UserRegistrationPanel panel, Model m) {
   super(RegistryBrowser.getInstance(), true);
   getMainPanel().add(panel, BorderLayout.CENTER);
   pack();
   setLocation(100, 20);
   this.model = m;
   setTitle(resourceBundle.getString("dialog.userreg.title"));
   setEditable(true);
 }
Exemplo n.º 2
0
 /**
  * Action performed when the OK button is pressed. Validate the dialog's contents and register the
  * user with the server.
  */
 protected void okAction() {
   try {
     this.model.validate();
     UserManager.authenticateAndSaveUser((UserModel) model);
     status = OK_STATUS;
     dispose();
   } catch (Exception e) {
     RegistryBrowser.displayError(e);
   }
 }