forked from bramanudom/tune_in_game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstructionsPanel.java~
executable file
·50 lines (38 loc) · 1.37 KB
/
InstructionsPanel.java~
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
41
42
43
44
45
46
47
48
49
50
/* Pet, Alice, and Jacqueline
* Instructions.java
* the opening screen for the TuneIn game */
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class InstructionsPanel extends JPanel {
private JLabel howToPlay,step1,step2,step3;
private ImageIcon howToPlayImg,step1Img,step2Img,step3Img,startButton2Img;
private JButton startButton2;
public InstructionsPanel (){
setLayout (new GridLayout(5,1));
setBackground(new Color(255, 222, 156));
howToPlayImg = new ImageIcon("howtoplay.gif");
howToPlay = new JLabel (howToPlayImg);
step1Img = new ImageIcon("step1.gif");
step1 = new JLabel(step1Img);
step2Img = new ImageIcon("step2.gif");
step2 = new JLabel(step2Img);
step3Img = new ImageIcon("step3.gif");
step3 = new JLabel(step3Img);
startButton2Img = new ImageIcon ("startbutton2.gif");
startButton2 = new JButton(startButton2Img);
startButton2.addActionListener(new ActionListener() { // Show "PlayPanel" panel when button is clicked
// @Override
public void actionPerformed(ActionEvent arg0) {
TuneInGUI.cl.show(TuneInGUI.cards, "Play Panel");
}
});
startButton2.setBorder(null);
startButton2.setMargin(new Insets(0, 0, 0, 0));
add(howToPlay);
add(step1);
add(step2);
add(step3);
add(startButton2);
}
}