public synchronized void loadProperties() {

    if (dataDir != null) {
      propertyFile = new File(dataDir, USER_FILENAME);
      // load font properties from last invocation
      if (propertyFile.exists()) {
        try {
          InputStream in = new FileInputStream(propertyFile);
          try {
            fontProps.load(in);
            fontManager.setFontProperties(fontProps);
          } finally {
            in.close();
          }
        } catch (IOException ex) {
          // check to make sure the storage relate dialogs can be shown
          if (getBoolean("application.showLocalStorageDialogs", true)) {
            Resources.showMessageDialog(
                null,
                JOptionPane.ERROR_MESSAGE,
                messageBundle,
                "fontManager.properties.title",
                "manager.properties.session.readError",
                ex);
          }
          // log the error
          if (logger.isLoggable(Level.WARNING)) {
            logger.log(Level.WARNING, "Error loading font properties cache", ex);
          }
        } catch (IllegalArgumentException e) {
          // propblem parsing fontProps, reread teh file
          setupDefaultProperties();
          saveProperties();
        }
      }
      // If no font data, then read font data and save the new file.
      else {
        setupDefaultProperties();
        saveProperties();
      }
    }
  }