forked from shreya-sejani/Quiz-Management-System
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathADDQ.java
More file actions
505 lines (434 loc) · 23.8 KB
/
Copy pathADDQ.java
File metadata and controls
505 lines (434 loc) · 23.8 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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
*/
package oop_assignment;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
public class ADDQ extends javax.swing.JFrame {
int k;
String s51;
String s7;
String s50;
int n=0;
/**
* Creates new form ADDQ
*
*
*/
public ADDQ(String str,String str1,int n) {
initComponents();
GL1.setText(str1);
GL2.setText(str);
k=n;
s50=str;
s51=str1;
}
/**
* 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() {
jPanel3 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
que = new javax.swing.JTextArea();
opt1 = new javax.swing.JTextField();
opt2 = new javax.swing.JTextField();
opt4 = new javax.swing.JTextField();
opt3 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
msg1 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
jj1 = new javax.swing.JLabel();
j2 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
GL2 = new javax.swing.JLabel();
GL1 = new javax.swing.JLabel();
jButton5 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel3.setBackground(new java.awt.Color(239, 188, 117));
jLabel1.setFont(new java.awt.Font("Yu Gothic UI Semilight", 0, 14)); // NOI18N
jLabel1.setText("Questions");
jLabel9.setFont(new java.awt.Font("Yu Gothic UI Semilight", 0, 12)); // NOI18N
jLabel9.setText("Option 2 :");
jLabel10.setFont(new java.awt.Font("Yu Gothic UI Semilight", 0, 12)); // NOI18N
jLabel10.setText("Option 3 :");
jLabel11.setFont(new java.awt.Font("Yu Gothic UI Semilight", 0, 12)); // NOI18N
jLabel11.setText("Option 4 :");
jLabel12.setFont(new java.awt.Font("Yu Gothic UI Semilight", 0, 12)); // NOI18N
jLabel12.setText("Answer : ");
que.setColumns(20);
que.setRows(5);
jScrollPane1.setViewportView(que);
opt1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
opt1ActionPerformed(evt);
}
});
jButton1.setText("SAVE");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/oop_assignment/icons8-back-arrow-50 (1).jpg"))); // NOI18N
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jPanel2.setBackground(new java.awt.Color(26, 74, 90));
jj1.setFont(new java.awt.Font("Yu Gothic UI Semilight", 1, 24)); // NOI18N
jj1.setForeground(new java.awt.Color(255, 255, 255));
jj1.setText("EXAMZAAPO.com");
j2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/oop_assignment/Untitled design.jpg"))); // NOI18N
jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
jLabel6.setForeground(new java.awt.Color(255, 255, 255));
jLabel6.setText("A QUIZ MANAGEMENT SYSTEM");
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/oop_assignment/adm2.jpg"))); // NOI18N
jLabel2.setText("jLabel2");
GL2.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
GL2.setForeground(new java.awt.Color(255, 255, 255));
GL2.setText("ADMIN");
GL1.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N
GL1.setForeground(new java.awt.Color(255, 255, 255));
GL1.setText("ADMIN - HOMEPAGE");
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(20, 20, 20)
.addComponent(j2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jj1, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(82, 82, 82)
.addComponent(GL1, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 187, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(GL2, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(42, 42, 42))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(28, 28, 28)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(j2)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jj1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6)))
.addGap(18, 18, 18)
.addComponent(GL1))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(38, 38, 38)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(GL2))))
.addContainerGap(10, Short.MAX_VALUE))
);
jButton5.setText("CLEAR");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(30, 30, 30)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel12)
.addComponent(jLabel9)))
.addGap(40, 40, 40)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jScrollPane1)
.addComponent(opt1)
.addComponent(opt2, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE)
.addComponent(opt4, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE)
.addComponent(opt3, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE)))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(54, 54, 54)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(30, 30, 30)
.addComponent(msg1, javax.swing.GroupLayout.PREFERRED_SIZE, 539, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1)
.addGap(126, 126, 126)
.addComponent(jButton5)
.addGap(126, 126, 126)))))
.addContainerGap(62, Short.MAX_VALUE))
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 67, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(opt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12))
.addGap(6, 6, 6))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(61, 61, 61)))
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(opt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel9))
.addGap(6, 6, 6)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(opt3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel10))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel11)
.addComponent(opt4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(52, 52, 52)
.addComponent(msg1)
.addGap(33, 33, 33)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton5)))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(67, 67, 67)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(47, 47, 47))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void opt1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_opt1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_opt1ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
Connection connection=null;
Statement statement=null;
ResultSet resultSet=null;
String s1=que.getText();
String s2=opt1.getText();
String s3=opt2.getText();
String s4=opt3.getText();
String s5=opt4.getText();
if(s1.trim().isEmpty() ||s2.trim().isEmpty() ||s3.trim().isEmpty() ||s4.trim().isEmpty() ||s5.trim().isEmpty() ){
msg1.setText("Enter all details."
);
}else{
try{
connection =DriverManager.getConnection(DB_URL,DB_USER,DB_PASSWD);
statement=connection.createStatement();
switch(k){
case 1:
resultSet=statement.executeQuery("select qid from que_bank where cid='2CS301'; ");
break;
case 2:
resultSet=statement.executeQuery("select qid from que_bank where cid='2CS302'; ");
break;
case 3:
resultSet=statement.executeQuery("select qid from que_bank where cid='2CS303'; ");
break;
case 4:
resultSet=statement.executeQuery("select qid from que_bank where cid='2CS304'; ");
break;
case 5:
resultSet=statement.executeQuery("select qid from que_bank where cid='2CS305'; ");
break;
case 6:
resultSet=statement.executeQuery("select qid from que_bank where cid='2CS306'; ");
break;
default:
break;
}
while(resultSet.next()){
id = resultSet.getInt(1);
n=1;
}
if(n==0){
id=1;
n=1;
}
else{
id++;
}
switch(k){
case 1:
// resultSet=statement.executeQuery("select id from DSAque; ");
s7 = "insert into que_bank values("+id +",'2CS301','"+s50+"','" +s1 +"','" +s2 +"','" +s3 +"','" +s4 +"','" +s5 +"')";
break;
case 2:
//resultSet=statement.executeQuery("select id from OOPque; ");
s7 = "insert into que_bank values("+id +",'2CS302','"+s50+"','" +s1 +"','" +s2 +"','" +s3 +"','" +s4 +"','" +s5 +"')";
break;
case 3:
// resultSet=statement.executeQuery("select id from DEque; ");
s7 = "insert into que_bank values("+id +",'2CS303','"+s50+"','" +s1 +"','" +s2 +"','" +s3 +"','" +s4 +"','" +s5 +"')";
break;
case 4:
// resultSet=statement.executeQuery("select id from DCque; ");
s7 = "insert into que_bank values("+id +",'2CS304','"+s50+"','" +s1 +"','" +s2 +"','" +s3 +"','" +s4 +"','" +s5 +"')";
break;
case 5:
//resultSet=statement.executeQuery("select id from DMque; ");
s7 = "insert into que_bank values("+id +",'2CS305','"+s50+"','" +s1 +"','" +s2 +"','" +s3 +"','" +s4 +"','" +s5 +"')";
break;
case 6:
// resultSet=statement.executeQuery("select id from POEque; ");
s7 = "insert into que_bank values("+id +",'2CS306','"+s50+"','" +s1 +"','" +s2 +"','" +s3 +"','" +s4 +"','" +s5 +"')";
break;
default:
break;
}
statement.executeUpdate(s7);
que.setText("");
opt1.setText("");
opt2.setText("");
opt3.setText("");
opt4.setText("");
msg1.setText("");
this.dispose();
JOptionPane.showMessageDialog(null,"Question was sucessfully saved in que id :"+ String.valueOf(id));
Admin3 o1= new Admin3(s50,s51,k);
this.dispose();
o1.setVisible(true);
}catch(SQLException ex){
System.out.println(ex);
}}
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
// TODO add your handling code here:
Admin3 o1= new Admin3(s50,s51,k);
this.dispose();
o1.setVisible(true);
}//GEN-LAST:event_jButton4ActionPerformed
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
// TODO add your handling code here:
que.setText("");
opt1.setText("");
opt2.setText("");
opt3.setText("");
opt4.setText("");
msg1.setText("");
}//GEN-LAST:event_jButton5ActionPerformed
/**
* @param args the command line arguments
*/
static final String DB_URL ="jdbc:mysql://localhost:3306/quiz";
static final String DB_DRV ="com.mysql.jdbc.Driver";
static final String DB_USER = "root";
static final String DB_PASSWD = "abc";
int id=1;
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(ADDQ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(ADDQ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(ADDQ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(ADDQ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
// switch (x) {
// case 1:
// String DB_URL="jdbc:mysql://localhost:3306/ques";
// break;
// case 2:
// break;
// default:
//
// }
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ADDQ("hello","hi",0).setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel GL1;
private javax.swing.JLabel GL2;
private javax.swing.JLabel j2;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JLabel jj1;
private javax.swing.JLabel msg1;
private javax.swing.JTextField opt1;
private javax.swing.JTextField opt2;
private javax.swing.JTextField opt3;
private javax.swing.JTextField opt4;
private javax.swing.JTextArea que;
// End of variables declaration//GEN-END:variables
}