-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminhome.java
More file actions
280 lines (254 loc) · 11.1 KB
/
Copy pathadminhome.java
File metadata and controls
280 lines (254 loc) · 11.1 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
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
package moc;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author intel
*/
public class adminhome extends javax.swing.JFrame {
public static int open=0;
/**
* Creates new form adminhome
*/
public adminhome() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenu2 = new javax.swing.JMenu();
jMenu4 = new javax.swing.JMenu();
jMenu5 = new javax.swing.JMenu();
jMenu6 = new javax.swing.JMenu();
jMenu7 = new javax.swing.JMenu();
jMenu8 = new javax.swing.JMenu();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jMenuBar1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "DashBoard", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 36), new java.awt.Color(255, 51, 51))); // NOI18N
jMenuBar1.setAlignmentY(0.5F);
jMenuBar1.setFont(new java.awt.Font("Algerian", 0, 24)); // NOI18N
jMenu1.setBackground(new java.awt.Color(153, 255, 0));
jMenu1.setIcon(new javax.swing.ImageIcon("D:\\college project\\icons8-question-mark-64.png")); // NOI18N
jMenu1.setText("Add Question");
jMenu1.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jMenu1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu1MouseClicked(evt);
}
});
jMenuBar1.add(jMenu1);
jMenu2.setBackground(new java.awt.Color(0, 255, 255));
jMenu2.setIcon(new javax.swing.ImageIcon("D:\\college project\\icons8-update-64.png")); // NOI18N
jMenu2.setText("Update Question");
jMenu2.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jMenu2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu2MouseClicked(evt);
}
});
jMenuBar1.add(jMenu2);
jMenu4.setBackground(new java.awt.Color(0, 255, 255));
jMenu4.setIcon(new javax.swing.ImageIcon("D:\\college project\\icons8-list-64.png")); // NOI18N
jMenu4.setText("All Question");
jMenu4.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jMenu4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu4MouseClicked(evt);
}
});
jMenuBar1.add(jMenu4);
jMenu5.setBackground(new java.awt.Color(0, 255, 255));
jMenu5.setIcon(new javax.swing.ImageIcon("D:\\college project\\icons8-delete-user-data-48.png")); // NOI18N
jMenu5.setText("Delete Question");
jMenu5.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jMenu5.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu5MouseClicked(evt);
}
});
jMenuBar1.add(jMenu5);
jMenu6.setBackground(new java.awt.Color(0, 255, 255));
jMenu6.setBorder(null);
jMenu6.setIcon(new javax.swing.ImageIcon("D:\\college project\\icons8-result-64.png")); // NOI18N
jMenu6.setText("Student Result");
jMenu6.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jMenu6.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu6MouseClicked(evt);
}
});
jMenuBar1.add(jMenu6);
jMenu7.setBackground(new java.awt.Color(0, 255, 255));
jMenu7.setIcon(new javax.swing.ImageIcon("D:\\college project\\icons8-shutdown-64.png")); // NOI18N
jMenu7.setText("Logout");
jMenu7.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jMenu7.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu7MouseClicked(evt);
}
});
jMenuBar1.add(jMenu7);
jMenu8.setBackground(new java.awt.Color(0, 255, 255));
jMenu8.setIcon(new javax.swing.ImageIcon("D:\\college project\\icons8-close-64.png")); // NOI18N
jMenu8.setText("Exit");
jMenu8.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jMenu8.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu8MouseClicked(evt);
}
});
jMenuBar1.add(jMenu8);
setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 1480, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 660, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jMenu7MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu7MouseClicked
// TODO add your handling code here:
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
int a=JOptionPane.showConfirmDialog(jf, "<html><body><font size=6 color=orange>Do You Really Want To Logout</font></body></html>","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
setVisible(false);
new loginadmin().setVisible(true);
}
}//GEN-LAST:event_jMenu7MouseClicked
private void jMenu8MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu8MouseClicked
// TODO add your handling code here:
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
int a=JOptionPane.showConfirmDialog(jf, "<html><body><font size=6 color=red>Do You Really Want To Exit Application</font></body></html>","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
System.exit(0);
}
}//GEN-LAST:event_jMenu8MouseClicked
private void jMenu1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu1MouseClicked
// TODO add your handling code here:
if(open==0)
{
new addnewquestion().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"One From is Already Open");
}
new addnewquestion();
addnewquestion di=new addnewquestion();
di.show();
}//GEN-LAST:event_jMenu1MouseClicked
private void jMenu2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu2MouseClicked
// TODO add your handling code here:
if(open==0)
{
new updatequestion().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"One From is Already Open");
}
}//GEN-LAST:event_jMenu2MouseClicked
private void jMenu4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu4MouseClicked
// TODO add your handling code here:
if(open==0)
{
new allquestion().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"One From is Already Open");
}
}//GEN-LAST:event_jMenu4MouseClicked
private void jMenu5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu5MouseClicked
// TODO add your handling code here:
if(open==0)
{
new deletequestion().setVisible(true);
open=1;
}
else
{
JFrame jf=new JFrame();
jf.setAlwaysOnTop(true);
JOptionPane.showMessageDialog(jf,"One From is Already Open");
}
}//GEN-LAST:event_jMenu5MouseClicked
private void jMenu6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jMenu6MouseClicked
// TODO add your handling code here:
if(open==0)
{
new studentresult().setVisible(true);
}
}//GEN-LAST:event_jMenu6MouseClicked
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(adminhome.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new adminhome().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu4;
private javax.swing.JMenu jMenu5;
private javax.swing.JMenu jMenu6;
private javax.swing.JMenu jMenu7;
private javax.swing.JMenu jMenu8;
private javax.swing.JMenuBar jMenuBar1;
// End of variables declaration//GEN-END:variables
}