-
Notifications
You must be signed in to change notification settings - Fork 0
/
Reception.java
273 lines (233 loc) · 8.14 KB
/
Reception.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package hotel.management.system;
import javax.swing.*;
import java.sql.*;
import java.awt.event.*;
import java.awt.*;
public class Reception extends JFrame {
private JPanel contentPane;
public static void main(String[] args) {
new Reception();
}
public Reception(){
setBounds(530, 200, 850, 570);
contentPane = new JPanel();
setContentPane(contentPane);
contentPane.setLayout(null);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("hotel/management/system/icons/fourth.jpg"));
Image i3 = i1.getImage().getScaledInstance(500, 500,Image.SCALE_DEFAULT);
ImageIcon i2 = new ImageIcon(i3);
JLabel l1 = new JLabel(i2);
l1.setBounds(250,30,500,470);
add(l1);
JButton btnNewCustomerForm = new JButton("New Customer Form");
btnNewCustomerForm.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
NewCustomer custom = new NewCustomer();
custom.setVisible(true);
setVisible(false);
}catch(Exception e1){
e1.printStackTrace();
}
}
});
btnNewCustomerForm.setBounds(10, 30, 200, 30);
btnNewCustomerForm.setBackground(Color.BLACK);
btnNewCustomerForm.setForeground(Color.WHITE);
contentPane.add(btnNewCustomerForm);
JButton btnNewButton = new JButton("Room");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
try{
Room room = new Room();
room.setVisible(true);
setVisible(false);
}
catch(Exception e){
e.printStackTrace();
}
}
});
btnNewButton.setBounds(10, 70, 200, 30);
btnNewButton.setBackground(Color.BLACK);
btnNewButton.setForeground(Color.WHITE);
contentPane.add(btnNewButton);
JButton btnNewButton_1 = new JButton("Department");
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
Department dept = new Department();
dept.setVisible(true);
setVisible(false);
}
catch (Exception e1){
e1.printStackTrace();
}
}
});
btnNewButton_1.setBounds(10, 110, 200, 30);
btnNewButton_1.setBackground(Color.BLACK);
btnNewButton_1.setForeground(Color.WHITE);
contentPane.add(btnNewButton_1);
JButton btnNewButton_2 = new JButton("All Employee Info");
btnNewButton_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
Employee em = new Employee();
em.setVisible(true);
setVisible(false);
}
catch (Exception e1){
e1.printStackTrace();
}
}
});
btnNewButton_2.setBounds(10, 150, 200, 30);
btnNewButton_2.setBackground(Color.BLACK);
btnNewButton_2.setForeground(Color.WHITE);
contentPane.add(btnNewButton_2);
JButton btnNewButton_3 = new JButton("Customer Info");
btnNewButton_3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
//error ---------------------
CustomerInfo customer = new CustomerInfo();
customer.setVisible(true);
setVisible(false);
}
catch (Exception e1){
e1.printStackTrace();
}
}
});
btnNewButton_3.setBounds(10, 190, 200, 30);
btnNewButton_3.setBackground(Color.BLACK);
btnNewButton_3.setForeground(Color.WHITE);
contentPane.add(btnNewButton_3);
JButton btnManagerInfo = new JButton("Manager Info");
btnManagerInfo.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
ManagerInfo mana = new ManagerInfo();
mana.setVisible(true);
setVisible(false);
}
catch (Exception e1){
e1.printStackTrace();
}
}
});
btnManagerInfo.setBounds(10, 230, 200, 30);
btnManagerInfo.setBackground(Color.BLACK);
btnManagerInfo.setForeground(Color.WHITE);
contentPane.add(btnManagerInfo);
JButton btnNewButton_4 = new JButton("Check Out");
btnNewButton_4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
CheckOut check;
try {
check = new CheckOut();
check.setVisible(true);
setVisible(false);
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
btnNewButton_4.setBounds(10, 270, 200, 30);
btnNewButton_4.setBackground(Color.BLACK);
btnNewButton_4.setForeground(Color.WHITE);
contentPane.add(btnNewButton_4);
JButton btnNewButton_5 = new JButton("Update Check Status");
btnNewButton_5.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
UpdateCheck update = new UpdateCheck();
update.setVisible(true);
setVisible(false);
}
catch(Exception e1){
e1.printStackTrace();
}
}
});
btnNewButton_5.setBounds(10, 310, 200, 30);
btnNewButton_5.setBackground(Color.BLACK);
btnNewButton_5.setForeground(Color.WHITE);
contentPane.add(btnNewButton_5);
JButton btnNewButton_6 = new JButton("Update Room Status");
btnNewButton_6.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
UpdateRoom room = new UpdateRoom();
room.setVisible(true);
setVisible(false);
}catch(Exception s)
{
s.printStackTrace();
}
}
});
btnNewButton_6.setBounds(10, 350, 200, 30);
btnNewButton_6.setBackground(Color.BLACK);
btnNewButton_6.setForeground(Color.WHITE);
contentPane.add(btnNewButton_6);
JButton btnPickUpSerice = new JButton("Pick up Service");
btnPickUpSerice.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
try{
PickUp pick = new PickUp();
pick.setVisible(true);
setVisible(false);
}
catch(Exception e){
e.printStackTrace();
}
}
});
btnPickUpSerice.setBounds(10, 390, 200, 30);
btnPickUpSerice.setBackground(Color.BLACK);
btnPickUpSerice.setForeground(Color.WHITE);
contentPane.add(btnPickUpSerice);
JButton btnSearchRoom = new JButton("Search Room");
btnSearchRoom.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
SearchRoom search = new SearchRoom();
search.setVisible(true);
setVisible(false);
}
catch (Exception ss){
ss.printStackTrace();
}
}
});
btnSearchRoom.setBounds(10, 430, 200, 30);
btnSearchRoom.setBackground(Color.BLACK);
btnSearchRoom.setForeground(Color.WHITE);
contentPane.add(btnSearchRoom);
JButton btnNewButton_7 = new JButton("Log Out");
btnNewButton_7.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
try {
new Login().setVisible(true);
setVisible(false);
} catch (Exception e) {
e.printStackTrace();
}
}
});
btnNewButton_7.setBounds(10, 470, 200, 30);
btnNewButton_7.setBackground(Color.BLACK);
btnNewButton_7.setForeground(Color.WHITE);
contentPane.add(btnNewButton_7);
getContentPane().setBackground(Color.WHITE);
setVisible(true);
}
}