-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSearch1.java
143 lines (119 loc) · 3.94 KB
/
Search1.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.border.Border;
public class Search1 extends JFrame implements ActionListener{
JLabel welcome,searchheading;
JButton searchbyusn,searchbycompany,searchbybranch,back;
Search1(){
super("Search");
Container con = getContentPane();
con.setLayout(null);
Color lightBlue = new Color(138,43,226);
con.setBackground(lightBlue);
con.setVisible(true);
searchheading = new JLabel("CAMPUS PLACEMENTS");
searchheading.setBounds(520,0, 400,150);
con.add(searchheading);
Font fonth = new Font("Verdana", Font.BOLD, 24);
searchheading.setFont(fonth);
searchheading.setForeground(Color.WHITE);
welcome = new JLabel("CHOOSE CRITERIA TO SEARCH STUDENTS");
welcome.setBounds(480,30, 400,150);
con.add(welcome);
Font fontw = new Font("Verdana", Font.BOLD, 16);
welcome.setFont(fontw);
welcome.setForeground(Color.WHITE);
Color blue = new Color(148,0,211);
Color pul = new Color(75,0,130);
Border bored = BorderFactory.createLineBorder(pul,5);
searchbyusn = new JButton("Search By USN");
searchbyusn.addActionListener(this);
searchbyusn.setBounds(180,275,230, 50);
Font font1 = new Font("Verdana", Font.BOLD, 16);
searchbyusn.setFont(font1);
searchbyusn.setBorder(bored);
searchbyusn.setForeground(Color.WHITE);
searchbyusn.setBackground(blue);
searchbycompany = new JButton("Search By Company");
searchbycompany.addActionListener(this);
searchbycompany.setBounds(500,275, 200, 50);
Font font2 = new Font("Verdana", Font.BOLD, 16);
searchbycompany.setFont(font2);
searchbycompany.setBorder(bored);
searchbycompany.setForeground(Color.WHITE);
searchbycompany.setBackground(blue);
searchbybranch = new JButton("Search By Branch");
searchbybranch.addActionListener(this);
searchbybranch.setBounds(830,275, 175, 50);
Font font3 = new Font("Verdana", Font.BOLD, 16);
searchbybranch.setFont(font3);
searchbybranch.setBorder(bored);
searchbybranch.setForeground(Color.WHITE);
searchbybranch.setBackground(blue);
Font font = new Font("Verdana", Font.BOLD, 16);
back = new JButton("Go Back");
back.setBounds(525,600,150,40);
back.addActionListener(this);
back.setFont(font);
back.setBorder(bored);
back.setForeground(Color.WHITE);
back.setBackground(blue);
con.add(searchbyusn);
con.add(searchbycompany);
con.add(searchbybranch);
con.add(back);
JLabel background;
con.setSize(1200,700);
con.setLayout(null);
ImageIcon img=new ImageIcon("C:\\Users\\MCHOME\\Downloads\\fsminipresent\\fsminipresent\\search1.jpg");
background = new JLabel("",img,JLabel.CENTER);
background.setBounds(0,0,1200,700);
add(background);
}
@Override
public void actionPerformed(ActionEvent ae) {
if(ae.getSource()==searchbyusn)
{
this.dispose();
SearchByUSN in=new SearchByUSN();
in.setSize(2300,790);
in.setVisible(true);
}
if(ae.getSource()==searchbycompany)
{
this.dispose();
SearchByCompany del=new SearchByCompany();
del.setSize(2300,790);
del.setVisible(true);
}
if(ae.getSource()==searchbybranch)
{
this.dispose();
SearchByBranch dis=new SearchByBranch();
dis.setSize(2300,790);
dis.setVisible(true);
}
if(ae.getSource()==back)
{
try
{
this.dispose();
Home h=new Home();
h.setSize(2300,790);
h.setVisible(true);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
}