把界面设置成操作系统样子的方式
直接在入口写
try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }
catch (Exception ex) { ex.printStackTrace(); }
启动后显示在屏幕的正中央。
pack();
setLocationRelativeTo(null);
setVisible(true);