setLocationRelativeTo(parent);
The above code needs to be executed AFTER you have added all the components to the dialog and packed the dialog and before you make the dialog visible.
In your current code the size of the dialog is (0, 0) so it can't be centered properly.