public ActionPanel(final Joculus app)
   {
      this.app_instance = app;
      setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));

      // Setting an empty border on a button removes its decoration.
      final EmptyBorder btn_border = new EmptyBorder(4, 4, 4, 4);

      JButton b;

      b = new JButton(getToolbarIcon("refresh", this));
      b.setToolTipText(UIStrings.UI_TOOLBAR_REFRESH_TIP);
      b.setBorder(btn_border);
      b.addActionListener(new ActionListener()
      {
         @Override
         public void actionPerformed(ActionEvent ae)
         {
            app.refreshDisplay();
         }
      });
      add(b);

      b = new JButton(getToolbarIcon("open", this));
      b.setToolTipText(UIStrings.UI_TOOLBAR_OPEN_TIP);
      b.setBorder(btn_border);
      b.addActionListener(new ActionListener()
      {
         @Override
         public void actionPerformed(ActionEvent ae)
         {
            actionOpenFile();
         }
      });
      add(b);

      b = new JButton(getToolbarIcon("edit", this));
      b.setToolTipText(UIStrings.UI_TOOLBAR_EDIT_TIP);
      b.setBorder(btn_border);
      b.addActionListener(new ActionListener()
      {
         @Override
         public void actionPerformed(ActionEvent ae)
         {
            actionEditFile();
         }
      });
      // TODO: open the configured editor -or- the editor that's specified by the EDITOR environment variable.
      add(b);

      add(Box.createHorizontalGlue());

      label_wc = new JLabel();
      label_wc.setBorder(new EmptyBorder(4, 6, 4, 6));
      add(label_wc);

      boolean display_wc = true;
      label_wc.setVisible(Joculus.settings.display_word_count);

      add(Box.createHorizontalGlue());

      b = new JButton(getToolbarIcon("style", this));
      b.setToolTipText(UIStrings.UI_TOOLBAR_STYLE_TIP);
      b.setBorder(btn_border);
      // TODO: pop up a menu with the currently configured stylesheets, and the option to manage stylesheets.
      add(b);

      b = new JButton(getToolbarIcon("settings", this));
      b.setToolTipText(UIStrings.UI_TOOLBAR_SETTINGS_TIP);
      b.setBorder(btn_border);
      b.addActionListener(new ActionListener()
      {
         @Override
         public void actionPerformed(ActionEvent ae)
         {
            if(settings_dlg == null)
            {
                settings_dlg = new SettingsDlg(app);
            }
            else
            {
                settings_dlg.setVisible(true);
            }
         }
      });
      add(b);

      b = new JButton(getToolbarIcon("about", this));
      b.setToolTipText(UIStrings.UI_TOOLBAR_ABOUT_TIP);
      b.setBorder(btn_border);
      b.addActionListener(new ActionListener()
      {
         @Override
         public void actionPerformed(ActionEvent ae)
         {
            AboutDlg d = new AboutDlg();
         }
      });
      add(b);
   }