-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathView_Employee.java
More file actions
69 lines (54 loc) · 1.56 KB
/
View_Employee.java
File metadata and controls
69 lines (54 loc) · 1.56 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
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class View_Employee implements ActionListener{
JFrame f;
JTextField t;
JLabel l1,l2;
JButton b,b2;
View_Employee(){
f=new JFrame("View");
f.setBackground(Color.green);
f.setLayout(null);
l1=new JLabel();
l1.setBounds(0,0,500,270);
l1.setLayout(null);
ImageIcon img=new ImageIcon(ClassLoader.getSystemResource("Icons/view.jpg"));
l1.setIcon(img);
l2=new JLabel("Employee ID:");
l2.setVisible(true);
l2.setBounds(40,60,250,30);
l2.setForeground(Color.black);
Font F1 = new Font("Comic Sans MS",Font.BOLD,20);
l2.setFont(F1);
l1.add(l2);
f.add(l1);
t=new JTextField();
t.setBounds(240,60,220,30);
l1.add(t);
b=new JButton("Search");
b.setBounds(240,150,100,30);
b.addActionListener(this);
l1.add(b);
b2=new JButton("Cancel");
b2.setBounds(360,150,100,30);
b2.addActionListener(this);
l1.add(b2);
f.setSize(500,270);
f.setLocation(450,250);
f.setVisible(true);
}
public void actionPerformed(ActionEvent ae){
if(ae.getSource()==b2){
f.setVisible(false);
details d=new details();
}
if(ae.getSource()==b){
f.setVisible(false);
Show_Data p=new Show_Data(t.getText());
}
}
public static void main(String[]ar){
View_Employee v=new View_Employee();
}
}