-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
74 lines (62 loc) · 1.8 KB
/
Main.java
File metadata and controls
74 lines (62 loc) · 1.8 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
import java.awt.Color;
import java.awt.Font;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Main extends JFrame implements ActionListener
{
JButton b1 = new JButton("CUSTOMER");
JButton b2 = new JButton("EMPLOYEE");
JButton b3 = new JButton("ADMIN");
public Main()
{
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setContentPane(new JLabel(new ImageIcon("E:\\FINAL PROJECT\\1.png")));
setVisible(true);
setSize(700,350);
Position();
setLayout(null);
}
public void actionPerformed(ActionEvent a)
{
if (a.getSource() == b1)
{
Customer c= new Customer();
this.setVisible(false);
}
if (a.getSource() == b2)
{
Customer c= new Customer();
this.setVisible(false);
}
if (a.getSource() == b3)
{
new addemploye();
this.setVisible(false);
}
}
public void Position()
{
add(b1);
b1.setBounds(500, 0, 200, 118);
b1.setFont(new Font("Open Sans", Font.BOLD, 20));
b1.setForeground(Color.WHITE);
b1.setFocusPainted(false);
b1.setContentAreaFilled(false);
b1.addActionListener(this);
add(b2);
b2.setBounds(500, 117, 200, 117);
b2.setFont(new Font("Open Sans", Font.BOLD, 20));
b2.setForeground(Color.WHITE);
b2.setFocusPainted(false);
b2.setContentAreaFilled(false);
b2.addActionListener(this);
add(b3);
b3.setBounds(500, 233, 200, 117);
b3.setFont(new Font("Open Sans", Font.BOLD, 20));
b3.setForeground(Color.WHITE);
b3.setFocusPainted(false);
b3.setContentAreaFilled(false);
b3.addActionListener(this);
}
}