创建框架 import javax.swing.* public class MyFrame { public static void main(String [args) { JFrame frame new JFrame ("Test Frame"); frame.setsize(400,300); frame.setVisible(true); /frame.setDefaultCloseOperation( JFrame.EXIT ON CLOSE) ©2006计算机系杨厚群 All rights lefts reserved. ©2006 计算机系 杨厚群 All rights & lefts reserved. 创建框架 import javax.swing.*; public class MyFrame { public static void main(String[] args) { JFrame frame = new JFrame("Test Frame"); frame.setSize(400, 300); frame.setVisible(true); // frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);① } }