added frame.setLocationRelativeTo(null);