public OverwriteDialog(final JFrame parent) {
    super(parent, "", true);
    bundle = Application.getResourceBundle();
    this.setTitle(bundle.getString("overwrite_title"));
    
    // Closing the window is equal to pressing the No-Button
    WindowListener windowListener = (new WindowAdapter() {
            @Override
      public void windowClosing(WindowEvent evt) {
        pressedNo();
      }
    });
    addWindowListener(windowListener);
    
    ActionListener actionListener = (new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        if(evt.getSource() == btYes)
          pressedYes();
        else if(evt.getSource() == btNo)
          pressedNo();
      }
    });
    
    // Enter is equal to pressing the Yes-Button and
    // Escape is equal to pressing the No-Button
    KeyListener keyListener = (new KeyAdapter() {
            @Override
      public void keyPressed(KeyEvent evt) {
        if(evt.getKeyCode() == KeyEvent.VK_ENTER)
          pressedYes();
        else if(evt.getKeyCode() == KeyEvent.VK_ESCAPE)
          pressedNo();
      }
    });
    addKeyListener(keyListener);

    lbFile = new JLabel("");
    cbAllFiles = new JCheckBox();
    cbAllFiles.setSelected(forAllfiles);
    cbAllFiles.setText(bundle.getString("overwrite_all_existing"));
    btYes = new JButton(bundle.getString("yes"));
    btNo = new JButton(bundle.getString("no"));
    btNo.setSelected(true);
    
    cbAllFiles.addKeyListener(keyListener);
    
    btYes.addActionListener(actionListener);
    btYes.addKeyListener(keyListener);
    
    btNo.addActionListener(actionListener);
    btNo.addKeyListener(keyListener);
    
    JPanel pnlMain = new JPanel();
    pnlMain.setBorder(BorderFactory.createEmptyBorder(8, 8, 10, 8));
    //pnlMain.setLayout(new GridBagLayout(3, 2, 4, 4));
    pnlMain.setLayout(new GridBagLayout());

    pnlMain.add(lbFile, new GridBagConstraints(
                0, 0, 1, 1, 1.0, 3.0, GridBagConstraints.LINE_START,
                GridBagConstraints.HORIZONTAL, new Insets(0,0,0,0), 0, 0));
    pnlMain.add(cbAllFiles, new GridBagConstraints(
                0, 1, 1, 1, 1.0, 3.0, GridBagConstraints.CENTER,
                GridBagConstraints.NONE, new Insets(0,0,0,0), 0, 0));
    pnlMain.add(btNo, new GridBagConstraints(
                0, 2, 1, 1, 1.0, 3.0, GridBagConstraints.LINE_END,
                GridBagConstraints.NONE, new Insets(0,0,0,0), 0, 0));
    pnlMain.add(btYes, new GridBagConstraints(
                1, 2, 1, 1, 1.0, 3.0, GridBagConstraints.LINE_START,
                GridBagConstraints.NONE, new Insets(0,0,0,0), 0, 0));
    
    Container contFrame = getContentPane();
    contFrame.setLayout(new BorderLayout());
    contFrame.add(pnlMain, "Center");
    
    pack();
    setSize(new Dimension(500,120));
  }