-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInvader.java
More file actions
40 lines (35 loc) · 883 Bytes
/
Invader.java
File metadata and controls
40 lines (35 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package shooting;
import javax.swing.JFrame;
public class Invader extends JFrame{
public static Title title;
public static MainPanel panel;
public static Invader frame;
public Invader() {
setTitle("Kodaira Wars!!");
setResizable(false);
title=new Title();
add(title);
//繝代ロ繝ォ繧オ繧、繧コ縺ォ蜷医o縺帙※繝輔Ξ繝シ繝?繧オ繧、繧コ繧定?ェ蜍戊ィュ螳?
pack();
}
public static void main(String[] args) {
frame=new Invader();
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
frame.setVisible(true);
}
public static void changeToTitle() {
frame.remove(panel);
frame.add(title);
frame.repaint();
frame.validate();
title.requestFocus();
}
public static void changeToGame() {
frame.remove(title);
panel=new MainPanel();
frame.add(panel);
frame.repaint();
frame.validate();
panel.requestFocus();
}
}