public void submitButtonActionPerformed(ActionEvent evt) {
    String text = "";

    IMUserAgent imUA = imGUI.getInstantMessagingUserAgent();
    IMRegisterProcessing imRegisterProcessing = imUA.getIMRegisterProcessing();
    if (!imRegisterProcessing.isRegistered()) {

      String temp = outboundProxyAddressTextField.getText();
      if (temp != null && !temp.trim().equals(""))
        text += "examples.im.outboundProxyAddress=" + temp + "\n";

      temp = outboundProxyPortTextField.getText();
      if (temp != null && !temp.trim().equals(""))
        text += "examples.im.outboundProxyPort=" + temp + "\n";

      temp = registrarAddressTextField.getText();
      if (temp != null && !temp.trim().equals(""))
        text += "examples.im.registrarAddress=" + temp + "\n";

      temp = registrarPortTextField.getText();
      if (temp != null && !temp.trim().equals(""))
        text += "examples.im.registrarPort=" + temp + "\n";

      temp = imAddressTextField.getText();
      if (temp != null && !temp.trim().equals("")) text += "examples.im.imAddress=" + temp + "\n";

      temp = imPortTextField.getText();
      if (temp != null && !temp.trim().equals("")) text += "examples.im.imPort=" + temp + "\n";

      temp = imProtocolTextField.getText();
      if (temp != null && !temp.trim().equals("")) text += "examples.im.imProtocol=" + temp + "\n";

      temp = outputFileTextField.getText();
      if (temp != null && !temp.trim().equals("")) {
        text += "examples.im.outputFile=" + temp + "\n";

        DebugIM.setDebugFile(temp);
      } else DebugIM.setDebugFile(null);

      temp = buddiesFileTextField.getText();
      if (temp != null && !temp.trim().equals("")) text += "examples.im.buddiesFile=" + temp + "\n";

      temp = authenticationFileTextField.getText();
      if (temp != null && !temp.trim().equals(""))
        text += "examples.im.authenticationFile=" + temp + "\n";

      temp = defaultRouterTextField.getText();
      if (temp != null && !temp.trim().equals(""))
        text += "examples.im.defaultRouter=" + temp + "\n";

      temp = imGUI.getLocalSipURLTextField().getText();
      if (temp != null && !temp.trim().equals("")) text += "examples.im.localSipURL=" + temp + "\n";

      String propertiesFile = imGUI.getPropertiesFile();
      if (propertiesFile == null)
        DebugIM.println(
            "DebugIM, unable to write the "
                + "properties, specify a properties file when you start the client");
      else {
        IMUtilities.writeFile(propertiesFile, text);
        imGUI.restart();
      }
      this.setVisible(false);

    } else {
      new AlertInstantMessaging(
          "You must sign out from the registrar before changing something!!!",
          JOptionPane.ERROR_MESSAGE);
    }
  }