-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddPerform1_View.java
137 lines (114 loc) · 4.78 KB
/
AddPerform1_View.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class AddPerform1_View extends PageView//implements ActionListener
{
String[] monthstamp = {"January","February","March","April","May","June","July","August","September","October","November","Desember"};
String[] placestamp = {"학관 101호", "학관 104호", "채플"};
String[] daystamp = new String[31];
String[] periodstamp = new String[7];
int i = 0;
AddPerform2_View addPerform2View;
HomeView_host newHost;
AddPerform1_View()
{
super();
JLabel title = new JLabel("공연 등록 - [1/2]");
JLabel label1 = new JLabel("공연 이름 :");
JLabel label2 = new JLabel("장소 :");
JLabel label3 = new JLabel("날짜 :");
JLabel label4 = new JLabel("기간 :");
JLabel label5 = new JLabel("공연 설명 :");
JLabel label6 = new JLabel("가격 :");
JTextArea area1 = new JTextArea(); //공연설명
JTextField field1 = new JTextField(15); //공연이름
JTextField field2 = new JTextField(15); //가격
JButton btn1 = new JButton("다음");
JButton btn2 = new JButton("취소");
for(i=0;i<31;i++) // Dropdown
{
daystamp[i] = String.valueOf(i+1);
}
for(i=0;i<7;i++)
{
periodstamp[i] = String.valueOf(i+1);
}
JComboBox monthList = new JComboBox(monthstamp);
JComboBox dayList = new JComboBox(daystamp);
JComboBox periodList = new JComboBox(periodstamp);
JComboBox placeList = new JComboBox(placestamp);
title.setBounds(30, 20, 200, 40);
label1.setBounds(30,70,80,40); //공연이름
label2.setBounds(30,110,80,40); //장소
label3.setBounds(30,150,80,40); //날짜
label4.setBounds(30,190,80,40); //기간
label6.setBounds(30,230,80,40); //가격
label5.setBounds(30,270,80,40); //공연 설명
btn1.setBounds(160,460,70,50);
btn2.setBounds(80,460,70,50);
field1.setBounds(110,70, 120, 30);
area1.setBounds(30,310,200,130);
field2.setBounds(110,230, 120, 30);
monthList.setBounds(110, 150, 60, 30);
dayList.setBounds(180,150, 50,30);
periodList.setBounds(110, 190, 70, 30);
placeList.setBounds(110,110,120,30);
title.setFont(new Font("Gulim", Font.BOLD, 15));
label1.setFont(new java.awt.Font("Gulim", 0, 14));
label2.setFont(new java.awt.Font("Gulim", 0, 14));
label3.setFont(new java.awt.Font("Gulim", 0, 14));
label4.setFont(new java.awt.Font("Gulim", 0, 14));
label5.setFont(new java.awt.Font("Gulim", 0, 14));
label6.setFont(new java.awt.Font("Gulim", 0, 14));
btn1.setFont(new java.awt.Font("Gulim", 0, 14));
area1.setFont(new java.awt.Font("Gulim", 0, 14));
field1.setFont(new java.awt.Font("Gulim", 0, 14));
field2.setFont(new java.awt.Font("Gulim", 0, 14));
monthList.setFont(new java.awt.Font("Gulim", 0, 14));
dayList.setFont(new java.awt.Font("Gulim", 0, 14));
periodList.setFont(new java.awt.Font("Gulim", 0, 14));
placeList.setFont(new java.awt.Font("Gulim", 0, 14));
add1panel.add(title);
add1panel.add(label1);
add1panel.add(label2);
add1panel.add(label3);
add1panel.add(label4);
add1panel.add(label5);
add1panel.add(label6);
add1panel.add(field1);
add1panel.add(field2);
add1panel.add(btn1);
add1panel.add(btn2);
add1panel.add(area1);
add1panel.add(monthList);
add1panel.add(dayList);
add1panel.add(periodList);
add1panel.add(placeList);
btn1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e) {
addPerform2View = new AddPerform2_View(field1.getText(),placeList.getSelectedIndex(),
monthList.getSelectedIndex(),dayList.getSelectedIndex(),
periodList.getSelectedIndex(),field2.getText(),area1.getText()); // Main Form to show after the Login Form.
dispose();
}
});
btn2.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
{
dispose();
newHost= new HomeView_host();
}
});
// frame setting
add1panel.setLayout(null);
page.setSize(350,600);
page.setContentPane(add1panel);
page.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
@Override
public void draw() {
// TODO Auto-generated method stub
}
}