-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dashboard.java
94 lines (70 loc) · 2.72 KB
/
Dashboard.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
package canteen.management.system;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class Dashboard extends JFrame implements ActionListener{
JMenuBar mb;
JMenu m1,m2;
JMenuItem i1,i2,i3,i4;
Dashboard(){
super("CONTACLESS COMPUTERIZED CANTEEN MANAGEMENT SYSTEM");
mb = new JMenuBar();
add(mb);
m1 = new JMenu("CANTEEN MANAGEMENT ");
m1.setForeground(Color.RED);
mb.add(m1);
m2 = new JMenu("ADMIN");
m2.setForeground(Color.BLUE);
mb.add(m2);
i1 = new JMenuItem("ORDER COUNTER");
i1.setBackground(Color.BLACK);
i1.setForeground(Color.WHITE);
i1.addActionListener(this);
m1.add(i1);
i2 = new JMenuItem("ADD EMPLOYEE");
i2.setBackground(Color.BLACK);
i2.setForeground(Color.WHITE);
i2.addActionListener(this);
m2.add(i2);
i3 = new JMenuItem("ADD TABLES ");
i3.setBackground(Color.BLACK);
i3.setForeground(Color.WHITE);
i3.addActionListener(this);
m2.add(i3);
i4 = new JMenuItem("ADD MENU");
i4.setBackground(Color.BLACK);
i4.setForeground(Color.WHITE);
i4.addActionListener(this);
m2.add(i4);
mb.setBounds(0,0,1920,30);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("canteen/management/system/icons/HOME1.PNG"));
Image i2 = i1.getImage().getScaledInstance(1950 , 1000 , Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel l1 = new JLabel(i3);
l1.setBounds(0, 0, 1950, 1000);
add(l1);
JLabel l2 = new JLabel("ACADEMIA CANTEEN WELCOMES YOU ");
l2.setBounds(440, 60, 1080, 70);
l2.setForeground(Color.white);
l2.setFont(new Font("serif",Font.PLAIN,40));
l1.add(l2);
getContentPane ().setBackground (Color.WHITE);
setLayout(null);
setBounds(0,0,1950,1020);
setVisible(true);
}
public void actionPerformed(ActionEvent ae){
if(ae.getActionCommand().equals("ORDER COUNTER")){
new OrderCounter().setVisible(true);
}else if(ae.getActionCommand().equals("ADD EMPLOYEE")){
new AddEmployee().setVisible(true);
}else if(ae.getActionCommand().equals("ADD TABLES ")){
new AddItems().setVisible(true);
}else if(ae.getActionCommand().equals("ADD MENU")){
new AddMenu().setVisible(true);
}
}
public static void main(String[] args){
new Dashboard().setVisible(true);
}
}