public PasswordDialog(final JFrame parent) {
    super(parent, "", true);
    bundle = Application.getResourceBundle();
    this.setTitle(bundle.getString("password_input"));
    
    // Closing the window is equal to pressing the Abort-Button
    WindowListener windowListener = (new WindowAdapter() {
      public void windowClosing(WindowEvent evt) {
        pressedAbort();
      }
    });
    addWindowListener(windowListener);
    
    ActionListener actionListener = (new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        if(evt.getSource() == btSend)
          pressedSend();
        else if(evt.getSource() == btAbort)
          pressedAbort();
      }
    });
    
    // Enter is equal to pressing the Send-Button and
    // Escape is equal to pressing the Abort-Button
    KeyListener keyListener = (new KeyAdapter() {
            @Override
      public void keyPressed(KeyEvent evt) {
        if(evt.getKeyCode() == KeyEvent.VK_ENTER)
          pressedSend();
        else if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
          pressedAbort();
      }
    });
    addKeyListener(keyListener);
    
    lbText = new JLabel(bundle.getString("password") + ": ");
    pfPasswd = new JPasswordField("");
    btSend = new JButton(bundle.getString("ok"));
    btAbort = new JButton(bundle.getString("cancel"));
    
    lbText.setHorizontalAlignment(JLabel.RIGHT);
    
    pfPasswd.addKeyListener(keyListener);
    
    btSend.addActionListener(actionListener);
    btSend.addKeyListener(keyListener);
    
    btAbort.addActionListener(actionListener);
    btAbort.addKeyListener(keyListener);
    
    JPanel pnlMain = new JPanel();
    pnlMain.setBorder(BorderFactory.createEmptyBorder(8, 8, 10, 8));
    pnlMain.setLayout(new GridLayout(2, 2, 4, 4));

    pnlMain.add(lbText);
    pnlMain.add(pfPasswd);
    pnlMain.add(btSend);
    pnlMain.add(btAbort);
    
    Container contFrame = getContentPane();
    contFrame.setLayout(new BorderLayout());
    contFrame.add(pnlMain, "Center");
    
    pack();
  }