-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDashboard.java
More file actions
98 lines (70 loc) · 2.96 KB
/
Copy pathDashboard.java
File metadata and controls
98 lines (70 loc) · 2.96 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package hotel.management.system;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Dashboard extends JFrame{
public static void main(String[] args) {
new Dashboard().setVisible(true);
}
public Dashboard() {
super("HOTEL MANAGEMENT SYSTEM");
setForeground(Color.CYAN);
setLayout(null);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/hotel.jpg"));
Image i2 = i1.getImage().getScaledInstance(1950, 800,Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel NewLabel = new JLabel(i3);
NewLabel.setBounds(0, 0, 1550, 800);
add(NewLabel);
JLabel AirlineManagementSystem = new JLabel("Twilight Thread Welcomes You");
AirlineManagementSystem.setForeground(Color.black);
AirlineManagementSystem.setFont(new Font("Algerian", Font.PLAIN, 55));
AirlineManagementSystem.setBounds(350, 60, 1000, 85);
NewLabel.add(AirlineManagementSystem);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
JMenu AirlineSystem = new JMenu("HOTEL MANAGEMENT");
AirlineSystem.setForeground(Color.BLUE);
menuBar.add(AirlineSystem);
JMenuItem FlightDetails = new JMenuItem("RECEPTION");
AirlineSystem.add(FlightDetails);
JMenu AirlineSystemHello = new JMenu("ADMIN");
AirlineSystemHello.setForeground(Color.RED);
menuBar.add(AirlineSystemHello);
JMenuItem FlightDetailshello1 = new JMenuItem("ADD EMPLOYEE");
AirlineSystemHello.add(FlightDetailshello1);
FlightDetailshello1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
try{
new AddEmployee().setVisible(true);
}catch(Exception e ){}
}
});
JMenuItem FlightDetailshello2 = new JMenuItem("ADD ROOMS");
AirlineSystemHello.add(FlightDetailshello2);
FlightDetailshello2.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
try{
new AddRoom().setVisible(true);
}catch(Exception e ){}
}
});
FlightDetails.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
new Reception();
}
});
JMenuItem FlightDetailshello3 = new JMenuItem("ADD DRIVERS");
AirlineSystemHello.add(FlightDetailshello3);
FlightDetailshello3.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
try{
new AddDrivers().setVisible(true);
}catch(Exception e ){}
}
});
setSize(1950,1090);
setVisible(true);
getContentPane().setBackground(Color.WHITE);
}
}