mian---mainpackage test;import javax.swing.JFrame;public class app extends JFrame{private static final long serialVersionUID=1;public static void main(String[] args){app mainWindow=new app();mainWindow.setTitle("第一个Swing程序");mainWindow.setSize(600, 400);mainWindow.setResizable(Boolean.FALSE);mainWindow.setLocationRelativeTo(null);mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);}}