protected void init() {
dialogSizeSettings = new DialogSizeSettings();
buttonPaneVisible = true;
confirmAction = new OKAction();
cancelAction = new CancelAction();
setDefaultCloseOperation( DISPOSE_ON_CLOSE );
final JPanel contentPane = new JPanel();
contentPane.setLayout( new BorderLayout() );
buttonPanel = createButtonsPane();
contentPane.add( createContentPane(), BorderLayout.CENTER );
contentPane.add( buttonPanel, BorderLayout.SOUTH );
setContentPane( contentPane );
final InputMap inputMap = contentPane.getInputMap( JComponent.WHEN_IN_FOCUSED_WINDOW );
final ActionMap actionMap = contentPane.getActionMap();
inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_ENTER, 0 ), "confirm" );
inputMap.put( KeyStroke.getKeyStroke( KeyEvent.VK_ESCAPE, 0 ), "cancel" );
actionMap.put( "confirm", getConfirmAction() );
actionMap.put( "cancel", getCancelAction() );
resizeDialog();
}