-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHome.java
157 lines (134 loc) · 3.82 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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import static javax.swing.JOptionPane.showMessageDialog;
import java.util.*;
import java.io.*;
public class Home extends JFrame implements ActionListener
{
JLabel welcome, heading;
private JButton insert, delete, display, search, ledger, eligible;
Home()
{
super("CampusIn:Placement Management System");
Container con = getContentPane();
con.setLayout(null);
Color lightBlue = new Color(164, 206, 209);
con.setBackground(lightBlue);
con.setSize(300,300);
con.setLayout(null);
con.setVisible(true);
heading = new JLabel("CAMPUSIN");
heading.setBounds(550,30, 400,150);
con.add(heading);
Font fonth = new Font("Verdana", Font.BOLD, 24);
heading.setFont(fonth);
heading.setForeground(Color.BLACK);
welcome = new JLabel("SELECT OPTION");
welcome.setBounds(550,100, 400,150);
con.add(welcome);
Font fontw = new Font("Verdana", Font.BOLD, 16);
welcome.setFont(fontw);
welcome.setForeground(Color.BLACK);
Color blue = new Color(42, 135, 141);
insert = new JButton("Insert/Modify Details");
insert.addActionListener(this);
insert.setBounds(180,275,230, 50);
Font font1 = new Font("Verdana", Font.BOLD, 16);
insert.setFont(font1);
insert.setForeground(Color.WHITE);
insert.setBackground(blue);
delete = new JButton("Delete Record");
delete.addActionListener(this);
delete.setBounds(500,275, 175, 50);
Font font2 = new Font("Verdana", Font.BOLD, 16);
delete.setFont(font2);
delete.setForeground(Color.WHITE);
delete.setBackground(blue);
display = new JButton("Display Record");
display.addActionListener(this);
display.setBounds(830,275, 175, 50);
Font font3 = new Font("Verdana", Font.BOLD, 16);
display.setFont(font3);
display.setForeground(Color.WHITE);
display.setBackground(blue);
search = new JButton("Search Record");
search.addActionListener(this);
search.setBounds(200,475, 175, 50);
Font font4 = new Font("Verdana", Font.BOLD, 16);
search.setFont(font4);
search.setForeground(Color.WHITE);
search.setBackground(blue);
ledger = new JButton("View changes");
ledger.addActionListener(this);
ledger.setBounds(500,475, 175, 50);
Font font5 = new Font("Verdana", Font.BOLD, 16);
ledger.setFont(font5);
ledger.setForeground(Color.WHITE);
ledger.setBackground(blue);
eligible = new JButton("Placement Eligibility");
eligible.addActionListener(this);
eligible.setBounds(800,475, 250, 50);
Font font6 = new Font("Verdana", Font.BOLD, 16);
eligible.setFont(font6);
eligible.setForeground(Color.WHITE);
eligible.setBackground(blue);
con.add(insert);
con.add(delete);
con.add(display);
con.add(search);
con.add(ledger);
con.add(eligible);
}
public void actionPerformed(ActionEvent ae)
{
if(ae.getSource()==insert)
{
this.dispose();
Insert in=new Insert();
in.setSize(2300,790);
in.setVisible(true);
}
if(ae.getSource()==delete)
{
this.dispose();
Delete del=new Delete();
del.setSize(2300,790);
del.setVisible(true);
}
if(ae.getSource()==display)
{
this.dispose();
Display dis=new Display();
dis.setSize(2300,790);
dis.setVisible(true);
}
if(ae.getSource()==search)
{
this.dispose();
Search ser=new Search();
ser.setSize(2300,790);
ser.setVisible(true);
}
if(ae.getSource()==ledger)
{
this.dispose();
Ledger led=new Ledger();
led.setSize(2300,790);
led.setVisible(true);
}
if(ae.getSource()==eligible)
{
this.dispose();
Eligible eli=new Eligible();
eli.setSize(2300,790);
eli.setVisible(true);
}
}
public static void main(String args[])
{
Home h=new Home();
h.setSize(2300,790);
h.setVisible(true);
}
}