|
|
|
@ -1,5 +1,9 @@
|
|
|
|
|
package com.msb;
|
|
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
|
import java.awt.event.WindowAdapter;
|
|
|
|
|
import java.awt.event.WindowEvent;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Author bingor
|
|
|
|
|
* @Date 2022-09-29 11:02
|
|
|
|
@ -9,7 +13,17 @@ package com.msb;
|
|
|
|
|
public class TankDemo {
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
|
|
|
|
|
Frame frame = new Frame();
|
|
|
|
|
frame.setTitle("Tank war");
|
|
|
|
|
frame.setSize(200, 100);
|
|
|
|
|
frame.setResizable(true);
|
|
|
|
|
frame.setVisible(true);
|
|
|
|
|
frame.addWindowListener(new WindowAdapter() {
|
|
|
|
|
@Override
|
|
|
|
|
public void windowClosing(WindowEvent e) {
|
|
|
|
|
System.exit(0);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|