how to put jframe in center of screen code example Example: open jframe in center of screen add this after setbounds setLocationRelativeTo(null);