this.setLocationByPlatform(true);
    private void initialize(String prompt) {        final int border = 12;        jContentFrame = new JPanel(new BorderLayout());                labelPrompt = new JLabel(prompt, JLabel.CENTER);        labelPrompt.setAlignmentX(JLabel.CENTER_ALIGNMENT);                passField = new JPasswordField(10);                btnOK = new JButton(utils._("OK"));        btnOK.addActionListener(new ActionListener() {           public void actionPerformed(ActionEvent e) {               returnValue = passField.getText();               dispose();            }                     });        Action actCancel = new AbstractAction() {            public void actionPerformed(ActionEvent e) {                returnValue = null;                dispose();            };        };        actCancel.putValue(Action.NAME, utils._("Cancel"));        btnCancel = new JButton(actCancel);        btnCancel.getActionMap().put("EscapePressed", actCancel);        btnCancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "EscapePressed");                Dimension boxy = new Dimension(border, border);        jContentFrame.add(Box.createRigidArea(boxy), BorderLayout.NORTH);        jContentFrame.add(Box.createRigidArea(boxy), BorderLayout.SOUTH);        jContentFrame.add(Box.createRigidArea(boxy), BorderLayout.EAST);        jContentFrame.add(Box.createRigidArea(boxy), BorderLayout.WEST);                Box box = Box.createVerticalBox();        box.add(labelPrompt);        box.add(Box.createRigidArea(boxy));        box.add(passField);        box.add(Box.createRigidArea(boxy));                Box boxButtons = Box.createHorizontalBox();        boxButtons.add(Box.createHorizontalGlue());        boxButtons.add(btnOK);        boxButtons.add(Box.createRigidArea(boxy));        boxButtons.add(btnCancel);        boxButtons.add(Box.createHorizontalGlue());                box.add(boxButtons);                jContentFrame.add(box, BorderLayout.CENTER);                this.add(jContentFrame);        this.setResizable(false);        this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);        this.getRootPane().setDefaultButton(btnOK);        this.pack();        this.setLocationByPlatform(true);    }