calling setLocationRelativeTo after pack