-
Notifications
You must be signed in to change notification settings - Fork 2
/
Home.java
78 lines (69 loc) · 1.87 KB
/
Home.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
import javax.swing.*;
import java.awt.FlowLayout;
import java.awt.event.*;
public class Home extends JFrame implements ActionListener{
Home(){
JPanel p1=new JPanel(new FlowLayout(FlowLayout.CENTER,50,10));
JButton b1=new JButton("Home");
p1.add(b1);
JButton b2=new JButton("Admin");
p1.add(b2);
b2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(e.getSource()==b2) {
AdminLout ad=new AdminLout();
ad.setSize(600,400);
ad.setLocationRelativeTo(null);
ad.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ad.setVisible(true);
ad.setResizable(false);
dispose();
}
}
});
JButton b3=new JButton("Faculty");
p1.add(b3);
b3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(e.getSource()==b3) {
FacLout ad=new FacLout();
ad.setSize(600,400);
ad.setLocationRelativeTo(null);
ad.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ad.setVisible(true);
ad.setResizable(false);
dispose();
}
}
});
JButton b4=new JButton("Student");
p1.add(b4);
b4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if(e.getSource()==b4) {
StudLout ad=new StudLout();
ad.setSize(600,400);
ad.setLocationRelativeTo(null);
ad.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
ad.setVisible(true);
ad.setResizable(false);
dispose();
}
}
});
JPanel p2=new JPanel();
p2.setLayout(null);
ImageIcon ic=new ImageIcon("/home/sarathmohan/Documents/Attendance Management System/pic.jpg");
JLabel l1=new JLabel(ic);
l1.setBounds(10,20,580,350);
p2.add(l1);
setLayout(null);
p1.setBounds(0,0,600,50);
p2.setBounds(0,0,600,360);
add(p1);
add(p2);
}
public void actionPerformed(ActionEvent e)
{
}
}