public void showNumberOfBulletinsFound(int bulletinsFound, String messageTag) {
   try {
     String title = getLocalization().getWindowTitle("notifySearchFound");
     String message = getLocalization().getFieldLabel(messageTag);
     String ok = getLocalization().getButtonLabel(EnglishCommonStrings.OK);
     String[] buttons = {ok};
     message =
         TokenReplacement.replaceToken(
             message, "#NumberBulletinsFound#", (new Integer(bulletinsFound)).toString());
     String[] contents = new String[] {message};
     getMainWindow().notifyDlg(title, contents, buttons);
   } catch (Exception e) {
     getMainWindow().unexpectedErrorDlg(e);
   }
 }
  public UiSetFolderOrderDlg(UiMainWindow owner, Vector originalFolderOrderToUse) {
    super(owner, "", true);
    originalFolderOrder = originalFolderOrderToUse;
    hiddenFolders = new Vector();
    okPressed = false;
    localization = owner.getLocalization();
    setTitle(localization.getWindowTitle("SetFolderOrder"));
    model = new DefaultListModel();
    for (int i = 0; i < originalFolderOrder.size(); ++i) {
      BulletinFolder bulletinFolder = ((BulletinFolder) originalFolderOrder.get(i));
      if (bulletinFolder.isVisible()) model.addElement(new LocalizedBulletinFolder(bulletinFolder));
      else hiddenFolders.add(bulletinFolder);
    }

    up = new UiButton(localization.getButtonLabel("FolderOrderUp"));
    up.addActionListener(this);
    down = new UiButton(localization.getButtonLabel("FolderOrderDown"));
    down.addActionListener(this);

    UiVBox upDownPanel = new UiVBox();
    upDownPanel.add(up);
    upDownPanel.addSpace();
    upDownPanel.add(down);

    folderList = new UiList();
    folderList.setModel(model);
    folderList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    folderList.setLayoutOrientation(JList.VERTICAL);

    UiScrollPane scroller = new UiScrollPane(folderList);

    ok = new UiButton(localization.getButtonLabel("ok"));
    ok.addActionListener(this);
    cancel = new UiButton(localization.getButtonLabel("cancel"));
    cancel.addActionListener(this);
    Box okCancelBox = Box.createHorizontalBox();
    Utilities.addComponentsRespectingOrientation(
        okCancelBox, new Component[] {ok, new UiLabel("   "), cancel, Box.createHorizontalGlue()});

    UiParagraphPanel foldersPanel = new UiParagraphPanel();
    foldersPanel.addComponents(scroller, upDownPanel);
    foldersPanel.addBlankLine();

    String rawText = localization.getFieldLabel("SetFolderOrder");
    HashMap map = new HashMap();
    map.put("#MoveFolderUp#", up.getText());
    map.put("#MoveFolderDown#", down.getText());
    String information = "";
    try {
      information = TokenReplacement.replaceTokens(rawText, map);
    } catch (TokenInvalidException e) {
      e.printStackTrace();
    }
    UiWrappedTextArea info = new UiWrappedTextArea(information, 40);
    info.setBorder(new EmptyBorder(5, 5, 5, 5));
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());
    contentPane.add(info, BorderLayout.NORTH);
    contentPane.add(foldersPanel, BorderLayout.CENTER);
    contentPane.add(okCancelBox, BorderLayout.SOUTH);
    getRootPane().setDefaultButton(ok);

    Utilities.centerDlg(this);
    setResizable(true);
  }