teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

修正箇所を修正

2017/05/11 09:35

投稿

Hinantius246
Hinantius246

スコア17

title CHANGED
File without changes
body CHANGED
@@ -22,12 +22,11 @@
22
22
  import javax.swing.JOptionPane;
23
23
  import javax.swing.JPanel;
24
24
 
25
- import game.Main;
26
25
  public class MainFrame extends JFrame{
27
26
  public String[] PanelNames = {"First","Second","Third"};
28
- FirstPanel fp = new FirstPanel(this,PanelNames[0]);
27
+ FirstPanel fp = new FirstPanel(PanelNames[0]);
29
- SecondPanel sp = new SecondPanel(this,PanelNames[1]);
28
+ SecondPanel sp = new SecondPanel(PanelNames[1]);
30
- ThirdPanel tp = new ThirdPanel(this,PanelNames[2]);
29
+ ThirdPanel tp = new ThirdPanel(PanelNames[2]);
31
30
  public JPanel[] jps = {fp,sp,tp};
32
31
 
33
32
  int i;
@@ -36,11 +35,11 @@
36
35
  private static final int HORIZONTAL = 1024;
37
36
 
38
37
  public MainFrame(){
39
- super(Main.title);
38
+ super("Test");
40
39
 
41
- this.add(fp);tp.setVisible(true);
40
+ this.add(fp);fp.setVisible(true);
42
- this.add(sp);dp.setVisible(false);
41
+ this.add(sp);sp.setVisible(false);
43
- this.add(tp);mp.setVisible(false);
42
+ this.add(tp);tp.setVisible(false);
44
43
 
45
44
  setBounds(100, 100, 300, 250);
46
45
 
@@ -124,7 +123,6 @@
124
123
  import javax.swing.JLabel;
125
124
  import javax.swing.JPanel;
126
125
 
127
- //4/22
128
126
  public class FirstPanel extends JPanel implements ActionListener{
129
127
  String str;
130
128