-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeCrackerAboutPanel.java
More file actions
63 lines (47 loc) · 1.8 KB
/
CodeCrackerAboutPanel.java
File metadata and controls
63 lines (47 loc) · 1.8 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* FILE: CodeCrackerAboutPanel.java
* AUTHORS: Clara Smith and Cali Stenson
* DATE: Dec 3 2013
* MODIFIED: Dec 3 2013
*
* CodeCrackerAboutPanel provides information about the authors and creation of the game.
*/
// import declarations
import java.util.*;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.*;
import java.awt.*;
import javax.swing.event.*;
import javax.swing.*;
import java.awt.image.BufferedImage;
import java.io.*;
import java.io.File;
import java.io.IOException;
import javax.swing.filechooser.FileFilter;
import javax.imageio.ImageIO;
public class CodeCrackerAboutPanel extends JPanel {
// instance vars
private ImagePanel aboutPanel;
private ReboundPanel sigsPanel;
private JLabel sigsLabel;
private BufferedImage sigsImage;
// preferred sizes
private final int WIDTH = 950, HEIGHT = 750;
// constructor
public CodeCrackerAboutPanel () {
// sets up visuals
//setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // sets layout to Box Layout
setLayout(new BorderLayout());
// whateverlabel.setFont(new Font("Serif", Font.PLAIN, 18)); // sets the font
this.setBackground(new Color(76, 168, 194)); // sets background color
this.setPreferredSize(new Dimension(WIDTH, HEIGHT)); // sets the size of the panel
aboutPanel = new ImagePanel(new ImageIcon("Images/About.png").getImage());
aboutPanel.setLayout(new BoxLayout(aboutPanel, BoxLayout.Y_AXIS));
sigsPanel = new ReboundPanel(); //see ReboundPanel class for more info on what rebound panel does
sigsPanel.setPreferredSize(new Dimension(WIDTH, 150));
sigsPanel.setOpaque(false); //sets it so image is see-through in parts
this.add(aboutPanel, BorderLayout.LINE_START);
this.add(sigsPanel, BorderLayout.PAGE_END);
}
}