parent
0c22cb4870
commit
fe5289abe3
@ -0,0 +1,21 @@
|
|||||||
|
package com.demo.tank.frame;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.event.WindowAdapter;
|
||||||
|
import java.awt.event.WindowEvent;
|
||||||
|
|
||||||
|
public class FrameTest {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Frame frame = new Frame();
|
||||||
|
frame.setVisible(true);
|
||||||
|
frame.setSize(800, 600);
|
||||||
|
frame.setResizable(false);
|
||||||
|
frame.setTitle("tank war");
|
||||||
|
frame.addWindowListener(new WindowAdapter() {
|
||||||
|
@Override
|
||||||
|
public void windowClosing(WindowEvent e) {
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue