setContentPane(contentPane);
}
private JPanel createButtonPanel()
{
final JButton btnCancel = new ActionButton(getCancelAction());
final JButton btnConfirm = new ActionButton(getConfirmAction());
final JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new GridLayout(1, 2, 5, 5));
buttonPanel.add(btnConfirm);
buttonPanel.add(btnCancel);
btnConfirm.setDefaultCapable(true);
getRootPane().setDefaultButton(btnConfirm);
buttonPanel.registerKeyboardAction(getConfirmAction(),
KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);