/** Called when the panel becomes active. */
  public void panelActivate() {
    parent.lockNextButton();
    parent.lockPrevButton();
    if (idata.installSuccess) {
      // We set the information
      centerPanel.add(
          new JLabel(
              parent.langpack.getString("FinishPanel.success"),
              parent.icons.getImageIcon("information"),
              JLabel.TRAILING));
      centerPanel.add(Box.createVerticalStrut(20));

      if (idata.info.getWriteUninstaller()) {
        // We prepare a message for the uninstaller feature
        String path = translatePath("$INSTALL_PATH") + File.separator + "Uninstaller";

        centerPanel.add(
            new JLabel(
                parent.langpack.getString("FinishPanel.uninst.info"),
                parent.icons.getImageIcon("information"),
                JLabel.TRAILING));
        centerPanel.add(new JLabel(path, parent.icons.getImageIcon("empty"), JLabel.TRAILING));
      }

      // We add the autoButton
      centerPanel.add(Box.createVerticalStrut(20));
      autoButton =
          ButtonFactory.createButton(
              parent.langpack.getString("FinishPanel.auto"),
              parent.icons.getImageIcon("edit"),
              idata.buttonsHColor);
      autoButton.setToolTipText(parent.langpack.getString("FinishPanel.auto.tip"));
      autoButton.addActionListener(this);
      centerPanel.add(autoButton);
    } else
      centerPanel.add(
          new JLabel(
              parent.langpack.getString("FinishPanel.fail"),
              parent.icons.getImageIcon("information"),
              JLabel.TRAILING));
  }
  /**
   * The constructor.
   *
   * @param parent The parent window.
   * @param idata The installation data.
   */
  public SudoPanel(InstallerFrame parent, InstallData idata) {
    super(parent, idata);

    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    add(
        new JLabel(
            /*parent.langpack.getString("SudoPanel.info")*/ "For installing administrator privileges are necessary",
            JLabel.TRAILING));

    add(Box.createRigidArea(new Dimension(0, 5)));

    add(
        new JLabel(
            /*parent.langpack.getString("SudoPanel.tip")*/ "Please note that passwords are case-sensitive",
            parent.icons.getImageIcon("tip"),
            JLabel.TRAILING));

    add(Box.createRigidArea(new Dimension(0, 5)));

    JPanel spacePanel = new JPanel();
    spacePanel.setAlignmentX(LEFT_ALIGNMENT);
    spacePanel.setAlignmentY(CENTER_ALIGNMENT);
    spacePanel.setBorder(BorderFactory.createEmptyBorder(80, 30, 0, 50));
    spacePanel.setLayout(new BorderLayout(5, 5));
    spacePanel.add(
        new JLabel(
            /*parent.langpack.getString("SudoPanel.specifyAdminPassword")*/ "Please specify your password:"),
        BorderLayout.NORTH);
    passwordField = new JPasswordField();
    passwordField.addActionListener(this);
    JPanel space2Panel = new JPanel();
    space2Panel.setLayout(new BorderLayout());
    space2Panel.add(passwordField, BorderLayout.NORTH);
    space2Panel.add(Box.createRigidArea(new Dimension(0, 5)), BorderLayout.CENTER);
    spacePanel.add(space2Panel, BorderLayout.CENTER);
    add(spacePanel);
  }