1、用setBounds
java.awt.Dimension dScreen = this.getToolkit().getScreenSize();
setBounds(new Rectangle((dScreen.width - dlgWidth) / 2,(dScreen.height - dlgHeight) / 2,dlgWidth,dlgHeight));2、JDialog(owner, "标题", true)