-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHotelManagementSystem.java
More file actions
75 lines (55 loc) · 2.36 KB
/
Copy pathHotelManagementSystem.java
File metadata and controls
75 lines (55 loc) · 2.36 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
64
65
66
67
68
69
70
71
72
73
74
75
/*
* 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 java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class HotelManagementSystem extends JFrame implements ActionListener{
JLabel l1;
JButton b1;
public HotelManagementSystem() {
setSize(1366,430); // setContentPane(300,300,1366,390); frame size
setLayout(null);
setLocation(300,300);
l1 = new JLabel("");
b1 = new JButton("Next");
b1.setBackground(Color.WHITE);
b1.setForeground(Color.BLACK);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("hotel/management/system/icons/first.jpg"));
Image i3 = i1.getImage().getScaledInstance(1366, 390,Image.SCALE_DEFAULT);
ImageIcon i2 = new ImageIcon(i3);
l1 = new JLabel(i2);
JLabel lid=new JLabel("HOTEL MANAGEMENT SYSTEM");
lid.setBounds(30,300,1500,100);
lid.setFont(new Font("serif",Font.PLAIN,70));
lid.setForeground(Color.red);
l1.add(lid);
b1.setBounds(1170,325,150,50);
l1.setBounds(0, 0, 1366, 390);
l1.add(b1);
add(l1);
b1.addActionListener(this);
setVisible(true);
while(true){
lid.setVisible(false); // lid = j label
try{
Thread.sleep(500); //1000 = 1 second
}catch(Exception e){}
lid.setVisible(true);
try{
Thread.sleep(500);
}catch(Exception e){}
}
}
public void actionPerformed(ActionEvent ae){
new Login().setVisible(true);
this.setVisible(false);
}
public static void main(String[] args) {
HotelManagementSystem window = new HotelManagementSystem();
window.setVisible(true);
}
}