The dialog widget doesn't provide this behavior out-of-the-box. You can hack the behavior yourself but it might break as you upgrade to newer jquery-ui releases. Here's how I would accomplish it:
$('#my-dialog').dialog({
buttons: {
'hello world': function() { alert('hello world'); },
'good bye': function() { alert('goodbye'); }
},
open: function(event, ui) {
// for whatever reason, the dialog isn't passed into us as a paramter, discover it.
var dialog = $(this).closest('.ui-dialog');
// create a copy of all the buttons and mark it as a clone (for later)
var originalButtons = $('.ui-dialog-buttonpane', dialog)
var clonedButtons = originalButtons.clone().addClass('clone');
$('.ui-dialog-titlebar', dialog).after(clonedButtons);
// cloning doesn't copy over event handlers, so we need to wire up
// the click events manually.
$('button', clonedButtons).click(function() {
var button = $(this);
var buttonIndex = $('button', clonedButtons).index(button);
$('button:eq(' + buttonIndex + ')', originalButtons).click();
});
}
});