質問編集履歴

1

修正箇所を修正

2017/05/11 09:35

投稿

Hinantius246
Hinantius246

スコア17

test CHANGED
File without changes
test CHANGED
@@ -46,17 +46,15 @@
46
46
 
47
47
 
48
48
 
49
- import game.Main;
50
-
51
49
  public class MainFrame extends JFrame{
52
50
 
53
51
  public String[] PanelNames = {"First","Second","Third"};
54
52
 
55
- FirstPanel fp = new FirstPanel(this,PanelNames[0]);
53
+ FirstPanel fp = new FirstPanel(PanelNames[0]);
56
-
54
+
57
- SecondPanel sp = new SecondPanel(this,PanelNames[1]);
55
+ SecondPanel sp = new SecondPanel(PanelNames[1]);
58
-
56
+
59
- ThirdPanel tp = new ThirdPanel(this,PanelNames[2]);
57
+ ThirdPanel tp = new ThirdPanel(PanelNames[2]);
60
58
 
61
59
  public JPanel[] jps = {fp,sp,tp};
62
60
 
@@ -74,15 +72,15 @@
74
72
 
75
73
  public MainFrame(){
76
74
 
77
- super(Main.title);
75
+ super("Test");
78
-
79
-
80
-
76
+
77
+
78
+
81
- this.add(fp);tp.setVisible(true);
79
+ this.add(fp);fp.setVisible(true);
82
-
80
+
83
- this.add(sp);dp.setVisible(false);
81
+ this.add(sp);sp.setVisible(false);
84
-
82
+
85
- this.add(tp);mp.setVisible(false);
83
+ this.add(tp);tp.setVisible(false);
86
84
 
87
85
 
88
86
 
@@ -250,8 +248,6 @@
250
248
 
251
249
 
252
250
 
253
- //4/22
254
-
255
251
  public class FirstPanel extends JPanel implements ActionListener{
256
252
 
257
253
  String str;