public SettingsDlg(Joculus j)
   {
      super();
      app_instance = j;

      // read the settings from the preferences, or use defaults.
      dialog_settings = new Settings();
      dialog_settings.load();

      // set up the dialog.
      this.setLayout(new BorderLayout());
      default_border = new EmptyBorder(10, 20, 10, 20);
      JTabbedPane tab_pane = new JTabbedPane();

      // get the folder icon to use for the browse buttons.
      try
      {
         folder_icon = new ImageIcon(
            ImageIO.read(this.getClass().getClassLoader().getResource("abstrys/joculus/res/toolbar/open.png")));
      }
      catch (IOException ex)
      {
         Joculus.showError(ex.getMessage());
      }

      tab_pane.addTab(UIStrings.SETTINGS_DIALOG_GENERAL_TITLE, createGeneralSettingsPanel());
      tab_pane.addTab(UIStrings.SETTINGS_DIALOG_CSS_TITLE, createCSSSettingsPanel());
      tab_pane.addTab(UIStrings.SETTINGS_DIALOG_MARKDOWN_PROCESSOR_TITLE, createProcessorSettingsPanel());

      this.add(tab_pane, BorderLayout.CENTER);
      add(createButtonsPanel(), BorderLayout.SOUTH);
      this.pack();
      this.setVisible(true);
      this.setResizable(false);
      this.setTitle(UIStrings.SETTINGS_DIALOG_TITLE);

      reset();
   }