private boolean saveSettings() {
        int maxDownloads, downloadPartCount, serverCheckInterval;
        float deleteLimit;
        try {
            maxDownloads = Integer.parseInt(maxParallelDownloadsText.getText());
            if (maxDownloads < 0)
                throw new NumberFormatException();
        } catch (NumberFormatException ex) {
            JOptionPane.showMessageDialog(null, "Please enter a valid number as maximum parallel downloads!", "Error", JOptionPane.ERROR_MESSAGE);
            return false;
        }
        try {
            downloadPartCount = Integer.parseInt(downloadPartsText.getText());
            if (downloadPartCount < 1)
                throw new NumberFormatException();
        } catch (NumberFormatException ex) {
            JOptionPane.showMessageDialog(null, "Please enter a valid number as download part count!", "Error", JOptionPane.ERROR_MESSAGE);
            return false;
        }
        try {
            serverCheckInterval = Integer.parseInt(serverCheckIntervalText.getText());
            if (serverCheckInterval < 0)
                throw new NumberFormatException();
        } catch (NumberFormatException ex) {
            JOptionPane.showMessageDialog(null, "Please enter a valid number as server check interval!", "Error", JOptionPane.ERROR_MESSAGE);
            return false;
        }
        try {
            deleteLimit = Float.parseFloat(fileSizeCheckText.getText());
            if (deleteLimit < 0.0f)
                throw new NumberFormatException();
        } catch (NumberFormatException ex) {
            JOptionPane.showMessageDialog(null, "Please enter a valid number as the limit for deleting small files!", "Error", JOptionPane.ERROR_MESSAGE);
            return false;
        }
        UserPreferences.PREF_USERNAME = usernameText.getText();
        UserPreferences.PREF_API_SECRET = String.valueOf(apiSecretText.getPassword());
        UserPreferences.PREF_PASSWORD = String.valueOf(passwordText.getPassword());
        UserPreferences.PREF_USERTOKEN = userTokenText.getText();
        UserPreferences.PREF_USE_PROXY = proxyUseCheck.isSelected();
        UserPreferences.PREF_PROXY_ADDRESS = proxyAddressText.getText();
        UserPreferences.PREF_PROXY_PORT = proxyPortText.getText();
        UserPreferences.PREF_AUTO_CONNECT = autoConnectCheck.isSelected();
        UserPreferences.PREF_START_IN_TRAY = startInTrayCheck.isSelected();
        UserPreferences.PREF_AUTO_DOWNLOAD = autoDownloadCheck.isSelected();
        UserPreferences.PREF_DOWNLOAD_TARGET = downloadTargetText.getText();
        UserPreferences.PREF_MAX_DOWNLOADS = maxDownloads;
        UserPreferences.PREF_DOWNLOAD_PART_COUNT = downloadPartCount;
        UserPreferences.PREF_FILE_SIZE_CHECK = fileSizeCheckCheck.isSelected();
        UserPreferences.PREF_FILE_SIZE_FOR_CHECK = deleteLimit;
        UserPreferences.PREF_FILE_SIZE_DELETE = fileSizeDeleteCheck.isSelected();
        UserPreferences.PREF_AUTO_CLEAN = autoCleanCheck.isSelected();
        UserPreferences.PREF_LOAD_SHARED = loadSharedCheck.isSelected();
        UserPreferences.PREF_SERVER_CHECK_INTERVAL = serverCheckInterval;
        UserPreferences.PREF_DONT_ASK_DOWNLOAD_AGAIN = redownloadCheck.isSelected();
        UserPreferences.PREF_BEHAVIOR_DOWNLOAD_AGAIN = redownloadCombo.getSelectedIndex();
        UserPreferences.PREF_DONT_ASK_OVERWRITE = overwriteCheck.isSelected();
        UserPreferences.PREF_BEHAVIOR_OVERWRITE = overwriteCombo.getSelectedIndex();
        UserPreferences.PREF_BEHAVIOR_SORT_BY = serverSortByCombo.getSelectedIndex();
        UserPreferences.PREF_BEHAVIOR_DOWNLOAD_EVERYTHING = everythingRadio.isSelected();
        UserPreferences.saveUserPreferences();
        return true;
    }