//下面这段一定要放最后!!!!!!!!!!
this.setTitle("权证中心消息");
this.setSize(500, 500);
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);//右上角可关闭
this.setVisible(true);//窗口显示
this.setResizable(false);//不可最大化
//居中
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setLocation(screenSize.width / 2 - getSize().width / 2,screenSize.height / 2 - getSize().height / 2);