repeatAsk = true;
    private void ReloadSettings() {        doLogout();                if (myopts.host.length() == 0) { // Prompt for server if not set            actOptions.actionPerformed(null);            return;        }                hyfc = new HylaFAXClient();        try {            hyfc.open(myopts.host, myopts.port);                        if (hyfc.user(myopts.user)) {                                if (myopts.askPassword) {                    boolean repeatAsk = true;                    do {                        String pwd = PasswordDialog.showPasswordDialog(this, _("User password"), MessageFormat.format(_("Please enter the password for user \"{0}\"."), myopts.user));                        if (pwd == null) { // User cancelled                            hyfc.quit();                            hyfc = null;                            return;                        } else                            try {                                hyfc.pass(pwd);                                repeatAsk = false;                            } catch (ServerResponseException e) {                                ExceptionDialog.showExceptionDialog(this, _("An error occured in response to the password:"), e);                                repeatAsk = true;                            }                    } while (repeatAsk);                } else                     hyfc.pass(myopts.pass);            }                        this.setTitle(myopts.user + "@" + myopts.host + " - " + utils.AppName  );                        if ((Boolean)actAdminMode.getValue(ActionJCheckBoxMenuItem.SELECTED_PROPERTY)) {                boolean authOK = false;                if (myopts.askAdminPassword) {                    do {                        String pwd = PasswordDialog.showPasswordDialog(this, _("Admin password"), MessageFormat.format(_("Please enter the administrative password for user \"{0}\"."), myopts.user));                        if (pwd == null) { // User cancelled                            break; //Continue in "normal" mode                        } else                            try {                                hyfc.admin(pwd);                                authOK = true;                            } catch (ServerResponseException e) {                                ExceptionDialog.showExceptionDialog(this, _("An error occured in response to the password:"), e);                                authOK = false;                            }                    } while (!authOK);                } else {                    hyfc.admin(myopts.AdminPassword);                    authOK = true; // No error => authOK                }                if (authOK) {                    // A reddish gray                    TextStatus.setBackground(new Color(Math.min(defStatusBackground.getRed() + 40, 255), defStatusBackground.getGreen(), defStatusBackground.getBlue()));                    this.setTitle(myopts.user + "@" + myopts.host + " (admin) - " +utils.AppName);                } else                    actAdminMode.putValue(ActionJCheckBoxMenuItem.SELECTED_PROPERTY, false);            }                        hyfc.setPassive(myopts.pasv);            hyfc.tzone(myopts.tzone.type);                        //getStatus();                        MyTableModel tm = getRecvTableModel();            tm.columns = myopts.recvfmt;            tm.fireTableStructureChanged();            hyfc.rcvfmt(utils.VectorToString(myopts.recvfmt, "|"));                        tm = getSentTableModel();            tm.columns = myopts.sentfmt;            tm.fireTableStructureChanged();            tm = getSendingTableModel();            tm.columns = myopts.sendingfmt;            tm.fireTableStructureChanged();                        TableRecv.setColumnCfgString(myopts.recvColState);            TableSent.setColumnCfgString(myopts.sentColState);            TableSending.setColumnCfgString(myopts.sendingColState);                        menuView.setEnabled(true);            // Re-check menu View state:            menuViewListener.reConnected();                        // Multi-threaded implementation of the periodic refreshes.            // I hope I didn't introduce too many race conditions/deadlocks this way            statRefresher = new StatusRefresher();            utmrTable.schedule(statRefresher, 0, myopts.statusUpdateInterval);                        tableRefresher = new TableRefresher(utils.VectorToString(myopts.sentfmt, "|"), utils.VectorToString(myopts.sendingfmt, "|"));            // Read the read/unread status *after* the table contents has been set             tableRefresher.run();            SwingUtilities.invokeLater(new Runnable() {                public void run() {                    try {                        recvTableModel.readFromStream(new FileInputStream(utils.getConfigDir() + "recvread"));                    } catch (FileNotFoundException e) {                         // No file yet - keep empty                    } catch (IOException e) {                        System.err.println("Error reading read status: " + e.getMessage());                    }                 }            });            utmrTable.schedule(tableRefresher, 0, myopts.tableUpdateInterval);        } catch (Exception e) {            //JOptionPane.showMessageDialog(this, _("An error occured connecting to the server:") + "\n" + e.getMessage(), _("Error"), JOptionPane.ERROR_MESSAGE);            ExceptionDialog.showExceptionDialog(this, _("An error occured connecting to the server:"), e);            actOptions.actionPerformed(null);        }            }