-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudentdetails.java
More file actions
1019 lines (907 loc) · 50.7 KB
/
Copy pathstudentdetails.java
File metadata and controls
1019 lines (907 loc) · 50.7 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
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package moc;
import java.awt.Color;
import java.awt.HeadlessException;
import java.sql.*;
import java.util.Date;
import java.text.SimpleDateFormat;
import javax.swing.JOptionPane;
/**
*
* @author intel
*/
public class studentdetails extends javax.swing.JFrame {
/**
* Creates new form studentdetails
*/
Connection con;
ResultSet rst;
PreparedStatement ps;
public studentdetails() {
initComponents();
SimpleDateFormat dFormat=new SimpleDateFormat("dd-MM-yyyy");
Date date=new Date();
jLabel4.setText(dFormat.format(date));
setTitle("Student Registration Form");
}
/**
* 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() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jTextField3 = new javax.swing.JTextField();
jTextField4 = new javax.swing.JTextField();
jTextField6 = new javax.swing.JTextField();
jComboBox1 = new javax.swing.JComboBox();
jTextField7 = new javax.swing.JTextField();
jTextField8 = new javax.swing.JTextField();
jTextField10 = new javax.swing.JTextField();
jTextField11 = new javax.swing.JTextField();
jTextField13 = new javax.swing.JTextField();
jTextField14 = new javax.swing.JTextField();
jTextField15 = new javax.swing.JTextField();
jButton3 = new javax.swing.JButton();
jLabel9 = new javax.swing.JLabel();
jLabel17 = new javax.swing.JLabel();
jTextField5 = new javax.swing.JTextField();
jPasswordField1 = new javax.swing.JPasswordField();
jCheckBox1 = new javax.swing.JCheckBox();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBackground(new java.awt.Color(255, 204, 0));
jLabel2.setFont(new java.awt.Font("Algerian", 1, 36)); // NOI18N
jLabel2.setText("fill the registration form");
jLabel3.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jLabel3.setText("date:");
jLabel4.setFont(new java.awt.Font("Algerian", 1, 18)); // NOI18N
jLabel4.setText("jLabel4");
jButton1.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jButton1.setText("back");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addGap(18, 18, 18)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 607, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(76, 76, 76)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(52, 52, 52)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE)
.addComponent(jButton1)
.addGap(29, 29, 29)
.addComponent(jButton2)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(25, 25, 25)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel2))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(43, 43, 43))
);
jPanel2.setBackground(new java.awt.Color(255, 204, 0));
jLabel5.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel5.setText("Roll Number:");
jLabel6.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel6.setText("First Name:");
jLabel7.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel7.setText("Middle Name");
jLabel8.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel8.setText("Last Name:");
jLabel10.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel10.setText("Mother Name:");
jLabel11.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel11.setText("Gender:");
jLabel12.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel12.setText("Contact nO. :");
jLabel13.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel13.setText("E-mail:");
jLabel14.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel14.setText("10TH:");
jLabel15.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel15.setText("12TH:");
jLabel16.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel16.setText("City:");
jTextField1.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField1.setForeground(new java.awt.Color(153, 153, 153));
jTextField1.setText("Enter A Roll Number");
jTextField1.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField1FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField1FocusLost(evt);
}
});
jTextField2.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField2.setForeground(new java.awt.Color(153, 153, 153));
jTextField2.setText("Enter A First Name");
jTextField2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField2ActionPerformed(evt);
}
});
jTextField2.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField2FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField2FocusLost(evt);
}
});
jTextField3.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField3.setForeground(new java.awt.Color(153, 153, 153));
jTextField3.setText("Enter A Middle Name");
jTextField3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField3ActionPerformed(evt);
}
});
jTextField3.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField3FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField3FocusLost(evt);
}
});
jTextField4.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField4.setForeground(new java.awt.Color(153, 153, 153));
jTextField4.setText("Enter A Last Name");
jTextField4.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField4FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField4FocusLost(evt);
}
});
jTextField6.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField6.setForeground(new java.awt.Color(153, 153, 153));
jTextField6.setText("Enter Mothers Name");
jTextField6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField6ActionPerformed(evt);
}
});
jTextField6.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField6FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField6FocusLost(evt);
}
});
jComboBox1.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "---SELECT----", "Male", "Female" }));
jComboBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox1ActionPerformed(evt);
}
});
jTextField7.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField7.setForeground(new java.awt.Color(153, 153, 153));
jTextField7.setText("Enter Your Moblie Number");
jTextField7.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField7FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField7FocusLost(evt);
}
});
jTextField8.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField8.setForeground(new java.awt.Color(153, 153, 153));
jTextField8.setText("Enter Email ID");
jTextField8.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField8FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField8FocusLost(evt);
}
});
jTextField10.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField10.setForeground(new java.awt.Color(153, 153, 153));
jTextField10.setText("Enter Percentage");
jTextField10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField10ActionPerformed(evt);
}
});
jTextField10.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField10FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField10FocusLost(evt);
}
});
jTextField11.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField11.setForeground(new java.awt.Color(153, 153, 153));
jTextField11.setText("Enter Passout Year");
jTextField11.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField11FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField11FocusLost(evt);
}
});
jTextField13.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField13.setForeground(new java.awt.Color(153, 153, 153));
jTextField13.setText("Enter Percentage");
jTextField13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField13ActionPerformed(evt);
}
});
jTextField13.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField13FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField13FocusLost(evt);
}
});
jTextField14.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField14.setForeground(new java.awt.Color(153, 153, 153));
jTextField14.setText("Enter Passout Year");
jTextField14.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField14FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField14FocusLost(evt);
}
});
jTextField15.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField15.setForeground(new java.awt.Color(153, 153, 153));
jTextField15.setText("Enter City");
jTextField15.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField15FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField15FocusLost(evt);
}
});
jButton3.setBackground(new java.awt.Color(255, 153, 153));
jButton3.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jButton3.setText("Register");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jLabel9.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel9.setText("Username:");
jLabel17.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jLabel17.setText("Password:");
jTextField5.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jTextField5.setForeground(new java.awt.Color(153, 153, 153));
jTextField5.setText("Enter A Username");
jTextField5.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jTextField5FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jTextField5FocusLost(evt);
}
});
jPasswordField1.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); // NOI18N
jPasswordField1.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jPasswordField1FocusGained(evt);
}
public void focusLost(java.awt.event.FocusEvent evt) {
jPasswordField1FocusLost(evt);
}
});
jCheckBox1.setFont(new java.awt.Font("Algerian", 1, 24)); // NOI18N
jCheckBox1.setText("Show The Password");
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCheckBox1ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(33, 33, 33)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel16)
.addComponent(jLabel5)
.addComponent(jLabel8)
.addComponent(jLabel10)
.addComponent(jLabel11)
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel13)
.addComponent(jLabel14)
.addComponent(jLabel15)
.addComponent(jLabel7))
.addGap(38, 38, 38)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 562, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(104, 104, 104))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 464, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 464, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(77, 77, 77)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTextField4)
.addComponent(jTextField6)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel6)))
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel9)
.addGap(30, 30, 30)
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addComponent(jLabel17)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(143, 143, 143))))
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel10)
.addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel11)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(45, 45, 45))
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel5)
.addGap(69, 69, 69)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel9)
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel17))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jCheckBox1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12)
.addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel13)
.addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel14)
.addGap(21, 21, 21)
.addComponent(jLabel15)
.addGap(24, 24, 24)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel16)))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(260, 260, 260))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 639, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
int a=JOptionPane.showConfirmDialog(null, "<html><body><font size=9 color=red>Do You Really Want To Close Form</font></body></html>","Select",JOptionPane.YES_NO_OPTION);
if(a==0)
{
System.exit(0);
}
}//GEN-LAST:event_jButton2ActionPerformed
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jComboBox1ActionPerformed
private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField6ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField6ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
setVisible(false);
new loginstudent().setVisible(true);
}//GEN-LAST:event_jButton1ActionPerformed
private void jTextField7FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField7FocusGained
// TODO add your handling code here:
if(jTextField7.getText().equals("Enter Your Moblie Number"))
{
jTextField7.setText("");
jTextField7.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField7FocusGained
private void jTextField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusGained
// TODO add your handling code here:
if(jTextField1.getText().equals("Enter A Roll Number"))
{
jTextField1.setText("");
jTextField1.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField1FocusGained
private void jTextField2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField2FocusGained
// TODO add your handling code here:
if(jTextField2.getText().equals("Enter A First Name"))
{
jTextField2.setText("");
jTextField2.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField2FocusGained
private void jTextField3FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField3FocusGained
// TODO add your handling code here:
if(jTextField3.getText().equals("Enter A Middle Name"))
{
jTextField3.setText("");
jTextField3.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField3FocusGained
private void jTextField4FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField4FocusGained
// TODO add your handling code here:
if(jTextField4.getText().equals("Enter A Last Name"))
{
jTextField4.setText("");
jTextField4.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField4FocusGained
private void jTextField6FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField6FocusGained
// TODO add your handling code here:
if(jTextField6.getText().equals("Enter Mothers Name"))
{
jTextField6.setText("");
jTextField6.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField6FocusGained
private void jTextField8FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField8FocusGained
// TODO add your handling code here:
if(jTextField8.getText().equals("Enter Email ID"))
{
jTextField8.setText("");
jTextField8.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField8FocusGained
private void jTextField10FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField10FocusGained
// TODO add your handling code here:
if(jTextField10.getText().equals("Enter Percentage"))
{
jTextField10.setText("");
jTextField10.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField10FocusGained
private void jTextField11FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField11FocusGained
// TODO add your handling code here:
if(jTextField11.getText().equals("Enter Passout Year"))
{
jTextField11.setText("");
jTextField11.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField11FocusGained
private void jTextField13FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField13FocusGained
// TODO add your handling code here:
if(jTextField13.getText().equals("Enter Percentage"))
{
jTextField13.setText("");
jTextField13.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField13FocusGained
private void jTextField14FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField14FocusGained
// TODO add your handling code here:
if(jTextField14.getText().equals("Enter Passout Year"))
{
jTextField14.setText("");
jTextField14.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField14FocusGained
private void jTextField15FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField15FocusGained
// TODO add your handling code here:
if(jTextField15.getText().equals("Enter City"))
{
jTextField15.setText("");
jTextField15.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField15FocusGained
private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField2ActionPerformed
private void jTextField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField1FocusLost
// TODO add your handling code here:
if(jTextField1.getText().equals(""))
{
jTextField1.setText("Enter A Roll Number");
jTextField1.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField1FocusLost
private void jTextField2FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField2FocusLost
// TODO add your handling code here:
if(jTextField2.getText().equals(""))
{
jTextField2.setText("Enter A First Name");
jTextField2.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField2FocusLost
private void jTextField3FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField3FocusLost
// TODO add your handling code here:
if(jTextField3.getText().equals(""))
{
jTextField3.setText("Enter A Middle Name");
jTextField3.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField3FocusLost
private void jTextField4FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField4FocusLost
// TODO add your handling code here:
if(jTextField4.getText().equals(""))
{
jTextField4.setText("Enter A Last Name");
jTextField4.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField4FocusLost
private void jTextField6FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField6FocusLost
// TODO add your handling code here:
if(jTextField6.getText().equals(""))
{
jTextField6.setText("Enter A Mothers Name");
jTextField6.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField6FocusLost
private void jTextField7FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField7FocusLost
// TODO add your handling code here:
if(jTextField7.getText().equals(""))
{
jTextField7.setText("Enter Your Moblie Number");
jTextField7.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField7FocusLost
private void jTextField8FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField8FocusLost
// TODO add your handling code here:
if(jTextField8.getText().equals(""))
{
jTextField8.setText("Enter Email ID");
jTextField8.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField8FocusLost
private void jTextField10FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField10FocusLost
// TODO add your handling code here:
if(jTextField10.getText().equals(""))
{
jTextField10.setText("Enter Percentage");
jTextField10.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField10FocusLost
private void jTextField11FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField11FocusLost
// TODO add your handling code here:
if(jTextField11.getText().equals(""))
{
jTextField11.setText("Enter Passout Year");
jTextField11.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField11FocusLost
private void jTextField13FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField13FocusLost
// TODO add your handling code here:
if(jTextField13.getText().equals(""))
{
jTextField13.setText("Enter Percentage");
jTextField13.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField13FocusLost
private void jTextField14FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField14FocusLost
// TODO add your handling code here:
if(jTextField14.getText().equals(""))
{
jTextField14.setText("Enter Passout Year");
jTextField14.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField14FocusLost
private void jTextField15FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField15FocusLost
// TODO add your handling code here:
if(jTextField15.getText().equals(""))
{
jTextField15.setText("Enter City");
jTextField15.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField15FocusLost
private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField3ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField3ActionPerformed
private void jTextField13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField13ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField13ActionPerformed
private void jTextField10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField10ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField10ActionPerformed
private void jTextField5FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField5FocusGained
// TODO add your handling code here:
if(jTextField5.getText().equals("Enter A Username"))
{
jTextField5.setText("");
jTextField5.setForeground(new Color(0,0,0));
}
}//GEN-LAST:event_jTextField5FocusGained
private void jTextField5FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField5FocusLost
// TODO add your handling code here:
if(jTextField5.getText().equals(""))
{
jTextField5.setText("Enter A Username");
jTextField5.setForeground(new Color(153,153,153));
}
}//GEN-LAST:event_jTextField5FocusLost
private void jPasswordField1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField1FocusGained
// TODO add your handling code here:
}//GEN-LAST:event_jPasswordField1FocusGained
private void jPasswordField1FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPasswordField1FocusLost
}//GEN-LAST:event_jPasswordField1FocusLost
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
// TODO add your handling code here:
if(jCheckBox1.isSelected())
{
jPasswordField1.setEchoChar((char)0);
}
else
{
jPasswordField1.setEchoChar('*');
}
}//GEN-LAST:event_jCheckBox1ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
// TODO add your handling code here:
String RollNo=jTextField1.getText();
String FirstName=jTextField2.getText();
String MiddleName=jTextField3.getText();
String LastName=jTextField4.getText();
String MothersName=jTextField6.getText();
String Gender=(String)jComboBox1.getSelectedItem();
String ContactNo=jTextField7.getText();
String EmailId=jTextField8.getText();
String TenthPercentage=jTextField10.getText();
String TenthPassoutYear=jTextField11.getText();
String TwelvethPercentage=jTextField13.getText();
String TwelvethPassoutYear=jTextField14.getText();
String City=jTextField15.getText();
String Marks="0";
String password=jPasswordField1.getText();
String Username=jTextField5.getText();
try
{
con=DriverManager.getConnection("jdbc:mysql://localhost/mocktest","root","");
ps=con.prepareStatement("insert into studentdetails values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1, RollNo);
ps.setString(2, FirstName);
ps.setString(3, MiddleName);
ps.setString(4, LastName);
ps.setString(5, MothersName);
ps.setString(6, Gender);
ps.setString(7, ContactNo);
ps.setString(8, EmailId);
ps.setString(9, TenthPercentage);
ps.setString(10, TenthPassoutYear);
ps.setString(11, TwelvethPercentage);
ps.setString(12, TwelvethPassoutYear);
ps.setString(13, City);
ps.setString(14, Marks);
ps.setString(15, Username);
ps.setString(16, password);
ps.executeUpdate();
JOptionPane.showMessageDialog(null, "<html><body><font color=red size=9>Registration Successfully Submited</font></body></html>");
setVisible(false);
new loginstudent().setVisible(true);
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField8.setText("");
jTextField10.setText("");
jTextField11.setText("");
jTextField13.setText("");
jTextField14.setText("");
jTextField15.setText("");
jPasswordField1.setText("");
}catch(SQLException | HeadlessException ex){
JOptionPane.showMessageDialog(null,ex);
}
}//GEN-LAST:event_jButton3ActionPerformed
/**
* @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(studentdetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(studentdetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(studentdetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(studentdetails.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 studentdetails().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;