Repository navigation
Expand file tree
/
Copy pathdashboard.java
More file actions
51 lines (40 loc) · 1.51 KB
/
Copy pathdashboard.java
File metadata and controls
51 lines (40 loc) · 1.51 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
import javax.swing.*;
import java.awt.*;
public class dashboard extends JFrame {
dashboard() {
setBounds(0, 0, 1550, 1000);
setLayout(null);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/third.jpg"));
Image i2 = i1.getImage().getScaledInstance(1550, 1000, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0, 0, 1550, 1000);
add(image);
JLabel text = new JLabel("AK GROUP WELCOMES YOU");
text.setBounds(400, 80, 1000, 50);
text.setFont(new Font("Tahoma", Font.BOLD, 46));
text.setForeground(Color.WHITE);
image.add(text);
JMenuBar mb = new JMenuBar();
mb.setBounds(0, 0, 1550, 30);
image.add(mb);
JMenu hotel = new JMenu("Management");
hotel.setForeground(Color.RED);
mb.add(hotel);
JMenuItem reception = new JMenuItem("RECEPTION");
hotel.add(reception);
JMenu admin = new JMenu("ADMIN");
admin.setForeground(Color.BLUE);
mb.add(admin);
JMenuItem addEmployee = new JMenuItem("ADD EMPLOYEE");
admin.add(addEmployee);
JMenuItem addRooms = new JMenuItem("ADD ROOMS");
admin.add(addRooms);
JMenuItem addDrivers = new JMenuItem("ADD DRIVERS");
admin.add(addDrivers);
setVisible(true);
}
public static void main(String[] args) {
new dashboard();
}
}