-
Notifications
You must be signed in to change notification settings - Fork 0
/
HomePage.java
68 lines (52 loc) · 1.72 KB
/
HomePage.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package java_gui;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
public class HomePage extends PagePanel {
private Image background=new ImageIcon("./Button_Images/background_home.PNG").getImage();
public void paint(Graphics g) {
g.drawImage(background, 0, 0, null);
}
public HomePage(Frame f, Field field) {
this.field = field;
Color b=new Color(27, 60, 53);
setBackground(b);
setSize(800, 600);
Frame F = f;
setLayout(null);
JLabel label = new JLabel("스터디카페 키오스크입니다.");
JLabel welcomeLable = new JLabel("스터디카페를 이용하려면 시작버튼을 클릭하세요");
add(label);
add(welcomeLable);
label.setBounds(300, 50, 500, 20);
welcomeLable.setBounds(250, 70, 500, 20);
JButton nextBtn = new JButton(new ImageIcon("./Button_Images/startBtn.PNG"));
nextBtn.setBorderPainted(false);
JButton checkoutBtn = new JButton(new ImageIcon("./Button_Images/checkOutBtn.PNG"));
checkoutBtn.setBorderPainted(false);
nextBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
F.nextPanel();
}
});
checkoutBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
F.gotoCheckout();
}
});
nextBtn.setBounds(450, 450, 200, 100);
checkoutBtn.setBounds(150, 450, 200, 100);
add(nextBtn);
add(checkoutBtn);
setVisible(true);
}
public void updatePage(){
this.updateUI();
}
}