how to open a jframe in the center of the screen code example
Example 1: open jframe in center of screen
add this after setbounds
setLocationRelativeTo(null);
Example 2: how to put jframe in center of screen using jframe properties
public frame() {
initComponents();
this.setLocationRelativeTo(null);
}