CoreJava/exp7/EventExit.java

15 lines
319 B
Java
Raw Normal View History

2024-05-09 09:10:51 +08:00
package exp7;
import javax.swing.JFrame;;
public class EventExit {
public static void main(String[] args) {
JFrame f = new JFrame("窗体关闭事件");
f.setDefaultCloseOperation(3);
f.setSize(400, 200);
f.setLocationRelativeTo(null);
f.setVisible(true);
}
}