-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearch_Employee.java
More file actions
67 lines (54 loc) · 1.54 KB
/
Search_Employee.java
File metadata and controls
67 lines (54 loc) · 1.54 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
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Search_Employee implements ActionListener{
JFrame f;
JTextField t;
JLabel l,l5;
JButton b,b2;
Search_Employee(){
f=new JFrame("Search");
f.setBackground(Color.green);
f.setLayout(null);
l5=new JLabel();
l5.setBounds(0,0,500,270);
l5.setLayout(null);
ImageIcon img=new ImageIcon(ClassLoader.getSystemResource("Icons/view.jpg"));
l5.setIcon(img);
l=new JLabel("Employee ID");
l.setVisible(true);
l.setBounds(40,50,250,30);
l.setForeground(Color.black);
Font F1=new Font("Comic Sans MS",Font.BOLD,20);
l.setFont(F1);
l5.add(l);
f.add(l5);
t=new JTextField();
t.setBounds(240,50,220,30);
l5.add(t);
b=new JButton("Search");
b.setBounds(240,150,100,30);
b.addActionListener(this);
l5.add(b);
b2=new JButton("Cancel");
b2.setBounds(360,150,100,30);
b2.addActionListener(this);
l5.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){
new Update_Employee(t.getText());
f.setVisible(false);
}
}
public static void main(String[]ar){
new Search_Employee();
}
}