CoreJava/exp7/EventExit.java
2024-05-09 09:10:51 +08:00

15 lines
319 B
Java

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);
}
}