set jframe in center of screen code example
Example 1: open jframe in center of screen
add this after setbounds
setLocationRelativeTo(null);
Example 2: open jframe in center of screen
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);