While steLocationRelativeTo(null) is the corrrect and accepted way to center a window on the screen, the posted code shouldn't result in a window that
goes to a little bit right hand side of the screen
Either initComponents() is changing the width of the dialog or the monitor isn't correctly calibrated.