int width = this.getContentPane().getWidth();
int height = this.getContentPane().getHeight();
int screenwidth = this.getToolkit().getDefaultToolkit().getScreenSize().width;
int screenheight = this.getToolkit().getDefaultToolkit().getScreenSize().height;
int x = screenwidth/2 - width/2;
int y = screenheight/2 - height/2;
swing开发,让面板居中显示
最新推荐文章于 2024-06-14 14:29:02 发布