In order to have custom button captions in an input dialog, I created the following code:
String key = null; JTextField txtKey = new JTextField(); in
Dialog Focus shows how you can easily set the focus on any component in a modal dialog.