-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPeriodic_Table_GUI_2.java
2463 lines (2432 loc) · 130 KB
/
Periodic_Table_GUI_2.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
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
import javax.swing.*;
import javax.swing.plaf.*;
import java.awt.event.*;
import java.awt.*;
/* This is Simple (Intermidate Level) GUI code of PERIODIC TABLE.
Just click on one of the ELEMENTS and view the Information of that ELEMENT.
Also this GUI has a Feature that Connects you to the WEB (Wikipedia) for more Information of ELEMENTS.*/
// Making connection for the WEB(Wikipedia).
public class Periodic_Table_GUI_2 extends JPanel {
public static void Open(String URL) {
try {
java.awt.Desktop.getDesktop().browse(java.net.URI.create(URL));
} catch (Exception e) {
}
}
public static void main(String[] args) {
// Frame
JFrame F = new JFrame("Periodic Table");
// Option Panel (Shows the inner content)
JOptionPane O = new JOptionPane();
// Toggle Button (ON and OFF for see ELEMENTS on web and local computer)
JToggleButton T = new JToggleButton();
// Labels (It shows the working of Labels)
JLabel L = new JLabel("What's This..?");
// // Magic Frame Settings (Uncomment it and See, but don't forget to comment the Last Code which is at the End of Program.)
// ImageIcon Img = new ImageIcon("Periodic1.png");
// F.setIconImage(Img.getImage());
// F.setSize(1300, 550);
// F.setLocationRelativeTo(null);
// F.setLayout(null);
// F.setVisible(true);
// F.getContentPane().setBackground(Color.BLACK);
// F.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
// About Button
JButton JAb = new JButton("About");
JAb.setBackground(Color.PINK);
JAb.setBounds(1188, 470, 68, 20);
JAb.setFocusPainted(false);
// JAb.setBorderPainted(false);
JAb.setBackground(Color.BLACK);
JAb.setForeground(Color.WHITE);
F.add(JAb);
JAb.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
O.showMessageDialog(F, "This GUI is made by SIDDHANT TOTADE", "About", JOptionPane.PLAIN_MESSAGE);
}
});
// Labels for the Groups of PERIODIC TABLE.
JLabel G1 = new JLabel("1"); // Creating JLabel for Groups
G1.setForeground(Color.WHITE); // Setting Foreground Color (Text Color)
G1.setBounds(59, -9, 100, 100); // Setting Postion, width, Height of Label
F.add(G1); // Adding in the Frame
JLabel G2 = new JLabel("2");
G2.setForeground(Color.WHITE);
G2.setBounds(127, 35, 100, 100);
F.add(G2);
JLabel G3 = new JLabel("3");
G3.setForeground(Color.WHITE);
G3.setBounds(195, 120, 100, 100);
F.add(G3);
JLabel G4 = new JLabel("4");
G4.setForeground(Color.WHITE);
G4.setBounds(263, 120, 100, 100);
F.add(G4);
JLabel G5 = new JLabel("5");
G5.setForeground(Color.WHITE);
G5.setBounds(331, 120, 100, 100);
F.add(G5);
JLabel G6 = new JLabel("6");
G6.setForeground(Color.WHITE);
G6.setBounds(399, 120, 100, 100);
F.add(G6);
JLabel G7 = new JLabel("7");
G7.setForeground(Color.WHITE);
G7.setBounds(467, 120, 100, 100);
F.add(G7);
JLabel G8 = new JLabel("8");
G8.setForeground(Color.WHITE);
G8.setBounds(535, 120, 100, 100);
F.add(G8);
JLabel G9 = new JLabel("9");
G9.setForeground(Color.WHITE);
G9.setBounds(603, 120, 100, 100);
F.add(G9);
JLabel G10 = new JLabel("10");
G10.setForeground(Color.WHITE);
G10.setBounds(666, 120, 100, 100);
F.add(G10);
JLabel G11 = new JLabel("11");
G11.setForeground(Color.WHITE);
G11.setBounds(734, 120, 100, 100);
F.add(G11);
JLabel G12 = new JLabel("12");
G12.setForeground(Color.WHITE);
G12.setBounds(802, 120, 100, 100);
F.add(G12);
JLabel G13 = new JLabel("13");
G13.setForeground(Color.WHITE);
G13.setBounds(870, 35, 100, 100);
F.add(G13);
JLabel G14 = new JLabel("14");
G14.setForeground(Color.WHITE);
G14.setBounds(938, 35, 100, 100);
F.add(G14);
JLabel G15 = new JLabel("15");
G15.setForeground(Color.WHITE);
G15.setBounds(1006, 35, 100, 100);
F.add(G15);
JLabel G16 = new JLabel("16");
G16.setForeground(Color.WHITE);
G16.setBounds(1074, 35, 100, 100);
F.add(G16);
JLabel G17 = new JLabel("17");
G17.setForeground(Color.WHITE);
G17.setBounds(1142, 35, 100, 100);
F.add(G17);
JLabel G18 = new JLabel("18");
G18.setForeground(Color.WHITE);
G18.setBounds(1215, -9, 100, 100);
F.add(G18);
// Labels for the Periods of PERIODIC TABLE.
JLabel P1 = new JLabel("1");// Creating JLabel for Period
P1.setForeground(Color.WHITE); // Setting Foreground Color (Text Color)
P1.setBounds(20, 20, 100, 100); // Setting Postion, width, Height of Label
F.add(P1); // Adding Label in the Frame
JLabel P2 = new JLabel("2");
P2.setForeground(Color.WHITE);
P2.setBounds(20, 65, 100, 100);
F.add(P2);
JLabel P3 = new JLabel("3");
P3.setForeground(Color.WHITE);
P3.setBounds(20, 105, 100, 100);
F.add(P3);
JLabel P4 = new JLabel("4");
P4.setForeground(Color.WHITE);
P4.setBounds(20, 150, 100, 100);
F.add(P4);
JLabel P5 = new JLabel("5");
P5.setForeground(Color.WHITE);
P5.setBounds(20, 192, 100, 100);
F.add(P5);
JLabel P6 = new JLabel("6");
P6.setForeground(Color.WHITE);
P6.setBounds(20, 235, 100, 100);
F.add(P6);
JLabel P7 = new JLabel("7");
P7.setForeground(Color.WHITE);
P7.setBounds(20, 280, 100, 100);
F.add(P7);
// Labels for showing the type of element.
JLabel LRN = new JLabel("Reactive Nonmetals"); // Creating JLabel for ELEMENTS Type
LRN.setForeground(Color.WHITE); // Setting Foreground Color (Text Color)
LRN.setBounds(325, -23, 120, 100); // Setting Postion, width, Height of Label
F.add(LRN); // Adding Label in the Frame
JLabel LAM = new JLabel("Alkali Metals");
LAM.setForeground(Color.WHITE);
LAM.setBounds(325, 8, 100, 100);
F.add(LAM);
JLabel LAeM = new JLabel("Alkaline Earth Metals");
LAeM.setForeground(Color.WHITE);
LAeM.setBounds(325, 38, 120, 100);
F.add(LAeM);
JLabel LTM = new JLabel("Transition Metals");
LTM.setForeground(Color.WHITE);
LTM.setBounds(325, 68, 100, 100);
F.add(LTM);
JLabel LPtM = new JLabel("Post Transition Metals");
LPtM.setForeground(Color.WHITE);
LPtM.setBounds(325, 98, 130, 100);
F.add(LPtM);
JLabel LM = new JLabel("Metalloids");
LM.setForeground(Color.WHITE);
LM.setBounds(525, -23, 100, 100);
F.add(LM);
JLabel LNG = new JLabel("Noble Gases");
LNG.setForeground(Color.WHITE);
LNG.setBounds(525, 8, 100, 100);
F.add(LNG);
JLabel LA = new JLabel("Actinoids");
LA.setForeground(Color.WHITE);
LA.setBounds(525, 38, 100, 100);
F.add(LA);
JLabel LL = new JLabel("Lantanoids");
LL.setForeground(Color.WHITE);
LL.setBounds(525, 68, 100, 100);
F.add(LL);
JLabel LH = new JLabel("Halogens");
LH.setForeground(Color.WHITE);
LH.setBounds(525, 98, 100, 100);
F.add(LH);
// Buttons for show which type of element is that.
JButton BRN = new JButton(); // Cretaing Buttons for ELEMENT Type
BRN.setBackground(Color.RED); // Setting color for Button
BRN.setBounds(300, 20, 15, 15); // Setting Position, Width, Height
BRN.setFocusPainted(false); // Remove the lines around button
BRN.setBorderPainted(false);
F.add(BRN); // Adding Button in the Frame
JButton BAM = new JButton();
BAM.setBackground(Color.PINK);
BAM.setBounds(300, 50, 15, 15);
BAM.setFocusPainted(false);
BAM.setBorderPainted(false);
F.add(BAM);
JButton BAeM = new JButton();
BAeM.setBackground(Color.ORANGE);
BAeM.setBounds(300, 80, 15, 15);
BAeM.setFocusPainted(false);
BAeM.setBorderPainted(false);
F.add(BAeM);
JButton BTM = new JButton();
BTM.setBackground(Color.CYAN);
BTM.setBounds(300, 110, 15, 15);
BTM.setFocusPainted(false);
BTM.setBorderPainted(false);
F.add(BTM);
JButton BPtM = new JButton();
BPtM.setBackground(Color.GREEN.darker());
BPtM.setBounds(300, 140, 15, 15);
BPtM.setFocusPainted(false);
BPtM.setBorderPainted(false);
F.add(BPtM);
JButton BM = new JButton();
BM.setBackground(Color.YELLOW);
BM.setBounds(500, 20, 15, 15);
BM.setFocusPainted(false);
BM.setBorderPainted(false);
F.add(BM);
JButton BH = new JButton();
BH.setBackground(Color.MAGENTA);
BH.setBounds(500, 50, 15, 15);
BH.setFocusPainted(false);
BH.setBorderPainted(false);
F.add(BH);
JButton BNG = new JButton();
BNG.setBackground(Color.BLUE.darker());
BNG.setBounds(500, 80, 15, 15);
BNG.setFocusPainted(false);
BNG.setBorderPainted(false);
F.add(BNG);
JButton BL = new JButton();
BL.setBackground(Color.MAGENTA.darker());
BL.setBounds(500, 110, 15, 15);
BL.setFocusPainted(false);
BL.setBorderPainted(false);
F.add(BL);
JButton BA = new JButton();
BA.setBackground(Color.LIGHT_GRAY.darker());
BA.setBounds(500, 140, 15, 15);
BA.setFocusPainted(false);
BA.setBorderPainted(false);
F.add(BA);
// Group - 1 : Elements
JButton B1 = new JButton("H"); // Creating Button for 1st Element
B1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
// setting the Button Operation (if it is TRUE then show Information on WEB and
// if it is FALSE the show the Local Information.)
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Hydrogen");
} else {
O.showMessageDialog(F,
"Discovered by - Henry Cavendish in 1766\nElement - Hydrogen\nSymbol - H\nGroup - 1\nPeriod - 1\nBlock - S\nAtomic Number - 1\nAtomic Mass - 1.008 u\nDensity (g/cm3) - 0.000082\nBoiling Point - -252.879 C, -423.182 F, 20.271 K\nMelting Point - -259.16 C, -434.49 F, 13.99 K",
"Hydrogen (H)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B1.setFont(new Font("Serif", Font.BOLD, 20)); // Setting of Font and Font size
B1.setBackground(Color.BLACK); // Background Color of Button.
B1.setForeground(Color.RED); // Foregroung Color of Button (H in Red Color)
B1.setBounds(30, 50, 65, 40); // Setting Position, Width, Height of Button
B1.setFocusPainted(false); // Remove the lines around Button
F.add(B1); // Adding Button in the Frame
JButton B3 = new JButton("Li");
B3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Lithium");
} else {
O.showMessageDialog(F,
"Discovered by - Johan August Arfvedson in 1817\nElement - Lithium\nSymbol - Li\nGroup - 1\nPeriod - 2\nBlock - S\nAtomic Number - 3\nAtomic Mass - 6.94 u\nDensity (g/cm3) - 0.534\nBoiling Point - 1342 C, 2448 F, 1615 K\nMelting Point - 180.50 C, 356.90 F, 453.65 K",
"Lithium (Li)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B3.setFont(new Font("Serif", Font.BOLD, 20));
B3.setBackground(Color.BLACK);
B3.setForeground(Color.PINK);
B3.setBounds(30, 93, 65, 40);
B3.setFocusPainted(false);
F.add(B3);
JButton B11 = new JButton("Na");
B11.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Sodium");
} else {
O.showMessageDialog(F,
"Discovered by - Humphry Davy in 1807\nElement - Sodium\nSymbol - Na\nGroup - 1\nPeriod - 3\nBlock - S\nAtomic Number - 11\nAtomic Mass - 22.990 u\nDensity (g/cm3) - 0.97\nBoiling Point - 882.940 C, 1621.292 F, 1156.090 K\nMelting Point - 97.794 C, 208.029 F, 370.944 K",
"Sodium (Na)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B11.setFont(new Font("Serif", Font.BOLD, 20));
B11.setBackground(Color.BLACK);
B11.setForeground(Color.PINK);
B11.setBounds(30, 136, 65, 40);
B11.setFocusPainted(false);
F.add(B11);
JButton B19 = new JButton("K");
B19.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Potassium");
} else {
O.showMessageDialog(F,
"Discovered by - Humphry Davy in 1807\nElement - Potassium\nSymbol - K\nGroup - 1\nPeriod - 4\nBlock - S\nAtomic Number - 19\nAtomic Mass - 39.098 u\nDensity (g/cm3) - 0.89\nBoiling Point - 759 C, 1398 F, 1032 K\nMelting Point - 63.5 C, 146.3 F, 336.7 K",
"Potassium (K)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B19.setFont(new Font("Serif", Font.BOLD, 20));
B19.setBackground(Color.BLACK);
B19.setForeground(Color.PINK);
B19.setBounds(30, 179, 65, 40);
B19.setFocusPainted(false);
F.add(B19);
JButton B37 = new JButton("Rb");
B37.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Rubidium");
} else {
O.showMessageDialog(F,
"Discovered by - Gustav Kirchhoff and Robert Bunsen in 1861\nElement - Rubidium\nSymbol - Rb\nGroup - 1\nPeriod - 5\nBlock - S\nAtomic Number - 37\nAtomic Mass - 85.468 u\nDensity (g/cm3) - 1.53\nBoiling Point - 688 C, 1270 F, 961 K \nMelting Point - 39.30 C, 102.74 F, 312.45 K",
"Rubidium (Rb)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B37.setFont(new Font("Serif", Font.BOLD, 20));
B37.setBackground(Color.BLACK);
B37.setForeground(Color.PINK);
B37.setBounds(30, 222, 65, 40);
B37.setFocusPainted(false);
F.add(B37);
JButton B55 = new JButton("Cs");
B55.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Caesium");
} else {
O.showMessageDialog(F,
"Discovered by - Gustav Kirchhoff and Robert Bunsen in 1860\nElement - Caesium\nSymbol - Cs\nGroup - 1\nPeriod - 6\nBlock - S\nAtomic Number - 55\nAtomic Mass - 132.905 u\nDensity (g/cm3) - 1.873\nBoiling Point - 671 C, 1240 F, 944 K\nMelting Point - 28.5 C, 83.3 F, 301.7 K",
"Caesium (Cs)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B55.setFont(new Font("Serif", Font.BOLD, 20));
B55.setBackground(Color.BLACK);
B55.setForeground(Color.PINK);
B55.setBounds(30, 265, 65, 40);
B55.setFocusPainted(false);
F.add(B55);
JButton B87 = new JButton("Fr");
B87.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Francium");
} else {
O.showMessageDialog(F,
"Discovered by - Marguerite Perey in 1939\nElement - Francium\nSymbol - Fr\nGroup - 1\nPeriod - 7\nBlock - S\nAtomic Number - 87\nAtomic Mass - [223] u\nDensity (g/cm3) - 2.48 (estimated)\nBoiling Point - 650 C, 1202 F, 923 K\nMelting Point - 21 C, 70 F, 294 K",
"Francium (Fr)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B87.setFont(new Font("Serif", Font.BOLD, 20));
B87.setBackground(Color.BLACK);
B87.setForeground(Color.PINK);
B87.setBounds(30, 308, 65, 40);
B87.setFocusPainted(false);
F.add(B87);
// Group - 2 : Elements
JButton B4 = new JButton("Be");
B4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Beryllium");
} else {
O.showMessageDialog(F,
"Discovered by - Nicholas Louis Vauquelin in 1797\nElement - Beryllium\nSymbol - Be\nGroup - 2\nPeriod - 2\nBlock - S\nAtomic Number - 4\nAtomic Mass - 9.012 u\nDensity (g/cm3) - 1.85\nBoiling Point - 2468 C, 4474 F, 2741 K\nMelting Point - 1287 C, 2349 F, 1560 K",
"Beryllium (Be)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B4.setFont(new Font("Serif", Font.BOLD, 20));
B4.setBackground(Color.BLACK);
B4.setForeground(Color.ORANGE);
B4.setBounds(98, 93, 65, 40);
B4.setFocusPainted(false);
F.add(B4);
JButton B12 = new JButton("Mg");
B12.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Magnesium");
} else {
O.showMessageDialog(F,
"Discovered by - Joseph Black in 1755\nElement - Magnesium\nSymbol - Mg\nGroup - 2\nPeriod - 3\nBlock - S\nAtomic Number - 12\nAtomic Mass - 24.305 u\nDensity (g/cm3) - 1.74\nBoiling Point - 1090 C, 1994 F, 1363 K\nMelting Point - 650 C, 1202 F, 923 K",
"Magnesium (Mg)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B12.setFont(new Font("Serif", Font.BOLD, 20));
B12.setBackground(Color.BLACK);
B12.setForeground(Color.ORANGE);
B12.setBounds(98, 136, 65, 40);
B12.setFocusPainted(false);
F.add(B12);
JButton B20 = new JButton("Ca");
B20.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Calcium");
} else {
O.showMessageDialog(F,
"Discovered by - Humphry Davy in 1808\nElement - Calcium\nSymbol - Ca\nGroup - 2\nPeriod - 4\nBlock - S\nAtomic Number - 20\nAtomic Mass - 40.078 u\nDensity (g/cm3) - 1.54\nBoiling Point - 1484 C, 2703 F, 1757 K\nMelting Point - 842 C, 1548 F, 1115 K",
"Calcium (Ca)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B20.setFont(new Font("Serif", Font.BOLD, 20));
B20.setBackground(Color.BLACK);
B20.setForeground(Color.ORANGE);
B20.setBounds(98, 179, 65, 40);
B20.setFocusPainted(false);
F.add(B20);
JButton B38 = new JButton("Sr");
B38.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Scrontium");
} else {
O.showMessageDialog(F,
"Discovered by - Adair Crawford in 1790\nElement - Scrontium\nSymbol - Sr\nGroup - 2\nPeriod - 5\nBlock - S\nAtomic Number - 38\nAtomic Mass - 87.62 u\nDensity (g/cm3) - 2.64\nBoiling Point - 1377 C, 2511 F, 1650 K\nMelting Point - 777 C, 1431 F, 1050 K",
"Scrontium (Sr)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B38.setFont(new Font("Serif", Font.BOLD, 20));
B38.setBackground(Color.BLACK);
B38.setForeground(Color.ORANGE);
B38.setBounds(98, 222, 65, 40);
B38.setFocusPainted(false);
F.add(B38);
JButton B56 = new JButton("Ba");
B56.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Barium");
} else {
O.showMessageDialog(F,
"Discovered by - Humphry Davy in 1808\nElement - Barium\nSymbol - Ba\nGroup - 2\nPeriod - 6\nBlock - S\nAtomic Number - 56\nAtomic Mass - 137.327 u\nDensity (g/cm3) - 3.62\nBoiling Point - 1845 C, 3353 F, 2118 K\nMelting Point - 727 C, 1341 F, 1000 K",
"Barium (Ba)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B56.setFont(new Font("Serif", Font.BOLD, 20));
B56.setBackground(Color.BLACK);
B56.setForeground(Color.ORANGE);
B56.setBounds(98, 265, 65, 40);
B56.setFocusPainted(false);
F.add(B56);
JButton B88 = new JButton("Ra");
B88.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Radium");
} else {
O.showMessageDialog(F,
"Discovered by - Pierre and Marie Curie in 1898\nElement - Radium\nSymbol - Ra\nGroup - 2\nPeriod - 7\nBlock - S\nAtomic Number - 88\nAtomic Mass - [226] u\nDensity (g/cm3) - 5\nBoiling Point - 1500 C, 2732 F, 1773 K\nMelting Point - 696 C, 1285 F, 969 K",
"Radium (Ra)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B88.setFont(new Font("Serif", Font.BOLD, 20));
B88.setBackground(Color.BLACK);
B88.setForeground(Color.ORANGE);
B88.setBounds(98, 308, 65, 40);
B88.setFocusPainted(false);
F.add(B88);
// Group - 3 : Elements
JButton B21 = new JButton("Sc");
B21.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Scandium");
} else {
O.showMessageDialog(F,
"Discovered by - Lars Frederik Nilson in 1879\nElement - Scandium\nSymbol - Sc\nGroup - 3\nPeriod - 4\nBlock - D\nAtomic Number - 21\nAtomic Mass - 44.956 u\nDensity (g/cm3) - 2.99\nBoiling Point - 2836 C, 5137 F, 3109 K\nMelting Point - 1541 C, 2806 F, 1814 K",
"Scandium (Sc)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B21.setFont(new Font("Serif", Font.BOLD, 20));
B21.setBackground(Color.BLACK);
B21.setForeground(Color.CYAN);
B21.setBounds(166, 179, 65, 40);
B21.setFocusPainted(false);
F.add(B21);
JButton B39 = new JButton("Y");
B39.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Yttrium");
} else {
O.showMessageDialog(F,
"Discovered by - Johan Gadolin in 1794\nElement - Yttrium\nSymbol - Y\nGroup - 3\nPeriod - 5\nBlock - D\nAtomic Number - 39\nAtomic Mass - 88.906 u\nDensity (g/cm3) - 4.47\nBoiling Point - 3345 C, 6053 F, 3618 K\nMelting Point - 1522 C, 2772 F, 1795 K",
"Yttrium (Y)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B39.setFont(new Font("Serif", Font.BOLD, 20));
B39.setBackground(Color.BLACK);
B39.setForeground(Color.CYAN);
B39.setBounds(166, 222, 65, 40);
B39.setFocusPainted(false);
F.add(B39);
JButton BLan = new JButton("*");
BLan.setFont(new Font("Serif", Font.BOLD, 20));
BLan.setBackground(Color.BLACK);
BLan.setForeground(Color.MAGENTA.darker());
BLan.setBounds(166, 265, 65, 40);
BLan.setFocusPainted(false);
F.add(BLan);
JButton BAct = new JButton("* *");
BAct.setFont(new Font("Serif", Font.BOLD, 20));
BAct.setBackground(Color.BLACK);
BAct.setForeground(Color.BLUE);
BAct.setBounds(166, 308, 65, 40);
BAct.setFocusPainted(false);
F.add(BAct);
JButton B57 = new JButton("La");
B57.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Lanthanum");
} else {
O.showMessageDialog(F,
"Discovered by - Carl Gustav Mosander in 1839\nElement - Lanthanum\nSymbol - La\nGroup - Lanthanides\nPeriod - 6\nBlock - D\nAtomic Number - 57\nAtomic Mass - 138.905 u\nDensity (g/cm3) - 6.15\nBoiling Point - 3464 C, 6267 F, 3737 K\nMelting Point - 920 C, 1688 F, 1193 K",
"Lanthanum (La)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B57.setFont(new Font("Serif", Font.BOLD, 20));
B57.setBackground(Color.BLACK);
B57.setForeground(Color.MAGENTA.darker());
B57.setBounds(166, 370, 65, 40);
B57.setFocusPainted(false);
F.add(B57);
JButton B89 = new JButton("Ac");
B89.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Actinium");
} else {
O.showMessageDialog(F,
"Discovered by - Andrew Debierne in 1899\nElement - Actinium\nSymbol - Ac\nGroup - Actinides\nPeriod - 7\nBlock - D\nAtomic Number - 89\nAtomic Mass - [227] u\nDensity (g/cm3) - 10\nBoiling Point - 3200 C, 5792 F, 3473 K\nMelting Point - 1050 C, 1922 F, 1323 K",
"Actinium (Ac)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B89.setFont(new Font("Serif", Font.BOLD, 20));
B89.setBackground(Color.BLACK);
B89.setForeground(Color.BLUE);
B89.setBounds(166, 413, 65, 40);
B89.setFocusPainted(false);
F.add(B89);
// Group - 4 : Elements
JButton B22 = new JButton("Ti");
B22.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Titanium");
} else {
O.showMessageDialog(F,
"Discovered by - William Gregor in 1791\nElement - Titanium\nSymbol - Ti\nGroup - 4\nPeriod - 4\nBlock - D\nAtomic Number - 22\nAtomic Mass - 47.867 u\nDensity (g/cm3) - 4.506\nBoiling Point - 3287 C, 5949 F, 3560 K\nMelting Point - 1670 C, 3038 F, 1943 K",
"Titanium (Ti)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B22.setFont(new Font("Serif", Font.BOLD, 20));
B22.setBackground(Color.BLACK);
B22.setForeground(Color.CYAN);
B22.setBounds(234, 179, 65, 40);
B22.setFocusPainted(false);
F.add(B22);
JButton B40 = new JButton("Zr");
B40.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Ziconium");
} else {
O.showMessageDialog(F,
"Discovered by - Martin Heinrich Klaproth in 1789\nElement - Zirconium\nSymbol - Zr\nGroup - 4\nPeriod - 5\nBlock - D\nAtomic Number - 40\nAtomic Mass - 91.224 u\nDensity (g/cm3) - 6.52\nBoiling Point - 4406 C, 7963 F, 4679 K\nMelting Point - 1854 C, 3369 F, 2127 K",
"Zirconium (Zr)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B40.setFont(new Font("Serif", Font.BOLD, 20));
B40.setBackground(Color.BLACK);
B40.setForeground(Color.CYAN);
B40.setBounds(234, 222, 65, 40);
B40.setFocusPainted(false);
F.add(B40);
JButton B58 = new JButton("Ce");
B58.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Cerium");
} else {
O.showMessageDialog(F,
"Discovered by - Jons Jacob Berzelius and Wilhelm Hisinger in 1803\nElement - Cerium\nSymbol - Ce\nGroup - Lanthanides\nPeriod - 6\nBlock - F\nAtomic Number - 58\nAtomic Mass - 140.116 u\nDensity (g/cm3) - 6.77\nBoiling Point - 3443 C, 6229 F, 3716 K\nMelting Point - 799 C, 1470 F, 1072 K",
"Cerium (Ce)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B58.setFont(new Font("Serif", Font.BOLD, 20));
B58.setBackground(Color.BLACK);
B58.setForeground(Color.MAGENTA.darker());
B58.setBounds(234, 370, 65, 40);
B58.setFocusPainted(false);
F.add(B58);
JButton B72 = new JButton("Hf");
B72.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Hafnium");
} else {
O.showMessageDialog(F,
"Discovered by - George Charles de Hevesy and Dirk Coster in 1923\nElement - Hafnium\nSymbol - Hf\nGroup - 4\nPeriod - 6\nBlock - D\nAtomic Number - 72\nAtomic Mass - 178.486 u\nDensity (g/cm3) - 13.3\nBoiling Point - 4600 C, 8312 F, 4873 K\nMelting Point - 2233 C, 4051 F, 2506 K",
"Hafnium (Hf)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B72.setFont(new Font("Serif", Font.BOLD, 20));
B72.setBackground(Color.BLACK);
B72.setForeground(Color.CYAN);
B72.setBounds(234, 265, 65, 40);
B72.setFocusPainted(false);
F.add(B72);
JButton B90 = new JButton("Th");
B90.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Thorium");
} else {
O.showMessageDialog(F,
"Discovered by - Jons Jacob Berzelius in 1829\nElement - Thorium\nSymbol - Th\nGroup - Actinides\nPeriod - 7\nBlock - F\nAtomic Number - 90\nAtomic Mass - 232.038 u\nDensity (g/cm3) - 11.7\nBoiling Point - 4785 C, 8645 F, 5058 K\nMelting Point - 1750 C, 3182 F, 2023 K",
"Thorium (Th)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B90.setFont(new Font("Serif", Font.BOLD, 20));
B90.setBackground(Color.BLACK);
B90.setForeground(Color.BLUE);
B90.setBounds(234, 413, 65, 40);
B90.setFocusPainted(false);
F.add(B90);
JButton B104 = new JButton("Rf");
B104.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Rutherfordium");
} else {
O.showMessageDialog(F,
"Discovered by - Georgy Flerov and colleagues and at Dubna, near Moscow, Russia, and independently by Albert Ghiorso and colleagues at Berkeley, California, USA in 1964\nElement - Rutherfordium\nSymbol - Rf\nGroup - 4\nPeriod - 7\nBlock - D\nAtomic Number - 104\nAtomic Mass - [267] u\nDensity (g/cm3) - 23 \nBoiling Point - 5500 C, 9900 F, 5800 K\nMelting Point - 2100 C, 3800 F, 2400 K",
"Rutherfordium (Rf)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B104.setFont(new Font("Serif", Font.BOLD, 20));
B104.setBackground(Color.BLACK);
B104.setForeground(Color.CYAN);
B104.setBounds(234, 308, 65, 40);
B104.setFocusPainted(false);
F.add(B104);
// Group - 5 : Elements
JButton B23 = new JButton("V");
B23.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Vanadium");
} else {
O.showMessageDialog(F,
"Discovered by - Andres Manuel del Rio in 1801\nElement - Vanadium\nSymbol - V\nGroup - 5\nPeriod - 4\nBlock - D\nAtomic Number - 23\nAtomic Mass - 50.942 u\nDensity (g/cm3) - 6.0\nBoiling Point - 3407 C, 6165 F, 3680 K\nMelting Point - 1910 C, 3470 F, 2183 K",
"Vanadium (V)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B23.setFont(new Font("Serif", Font.BOLD, 20));
B23.setBackground(Color.BLACK);
B23.setForeground(Color.CYAN);
B23.setBounds(302, 179, 65, 40);
B23.setFocusPainted(false);
F.add(B23);
JButton B41 = new JButton("Nb");
B41.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Niobium");
} else {
O.showMessageDialog(F,
"Discovered by - Charles Hatchett in 1801\nElement - Niobium\nSymbol - Nb\nGroup - 5\nPeriod - 5\nBlock - D\nAtomic Number - 41\nAtomic Mass - 92.906 u\nDensity (g/cm3) - 8.57\nBoiling Point - 4741 C, 8566 F, 5014 K\nMelting Point - 2477 C, 4491 F, 2750 K",
"Niobium (Nb)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B41.setFont(new Font("Serif", Font.BOLD, 20));
B41.setBackground(Color.BLACK);
B41.setForeground(Color.CYAN);
B41.setBounds(302, 222, 65, 40);
B41.setFocusPainted(false);
F.add(B41);
JButton B59 = new JButton("Pr");
B59.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Praseodimium");
} else {
O.showMessageDialog(F,
"Discovered by - Carl Auer von Welsbach in 1885\nElement - Praseodymium\nSymbol - Pr\nGroup - Lanthanides\nPeriod - 6\nBlock - F\nAtomic Number - 59\nAtomic Mass - 140.908 u\nDensity (g/cm3) - 6.77\nBoiling Point - 3520 C, 6368 F, 3793 K\nMelting Point - 931 C, 1708 F, 1204 K",
"Praseodymium (Pr)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B59.setFont(new Font("Serif", Font.BOLD, 20));
B59.setBackground(Color.BLACK);
B59.setForeground(Color.MAGENTA.darker());
B59.setBounds(302, 370, 65, 40);
B59.setFocusPainted(false);
F.add(B59);
JButton B73 = new JButton("Ta");
B73.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Tantalum");
} else {
O.showMessageDialog(F,
"Discovered by - Anders Gustav Ekeberg in 1802\nElement - Tantalum\nSymbol - Ta\nGroup - 5\nPeriod - 6\nBlock - D\nAtomic Number - 73\nAtomic Mass - 180.948 u\nDensity (g/cm3) - 16.4\nBoiling Point - 5455 C, 9851 F, 5728 K\nMelting Point - 3017 C, 5463 F, 3290 K",
"Tantalum (Ta)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B73.setFont(new Font("Serif", Font.BOLD, 20));
B73.setBackground(Color.BLACK);
B73.setForeground(Color.CYAN);
B73.setBounds(302, 265, 65, 40);
B73.setFocusPainted(false);
F.add(B73);
JButton B91 = new JButton("Pa");
B91.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Protactinium");
} else {
O.showMessageDialog(F,
"Discovered by - Kasimir Fajans and Otto Gohring in 1913\nElement - Protactinium\nSymbol - Pa\nGroup - Actinides\nPeriod - 7\nBlock - F\nAtomic Number - 91\nAtomic Mass - 231.036 u\nDensity (g/cm3) - 15.4\nBoiling Point - 4000 C, 7232 F, 4273 K\nMelting Point - 1572 C, 2862 F, 1845 K",
"Protactinium (Pa)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B91.setFont(new Font("Serif", Font.BOLD, 20));
B91.setBackground(Color.BLACK);
B91.setForeground(Color.BLUE);
B91.setBounds(302, 413, 65, 40);
B91.setFocusPainted(false);
F.add(B91);
JButton B105 = new JButton("Db");
B105.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Dubnium");
} else {
O.showMessageDialog(F,
"Discovered by - Scientists at both Berkeley, California, USA, and Dubna, near Moscow, Russia in 1968-1970\nElement - Dubnium\nSymbol - Db\nGroup - 5\nPeriod - 7\nBlock - D\nAtomic Number - 105\nAtomic Mass - [268] u\nDensity (g/cm3) - 21.6\nBoiling Point - Unknown\nMelting Point - Unknown",
"Dubnium (Db)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B105.setFont(new Font("Serif", Font.BOLD, 20));
B105.setBackground(Color.BLACK);
B105.setForeground(Color.CYAN);
B105.setBounds(302, 308, 65, 40);
B105.setFocusPainted(false);
F.add(B105);
// Group - 6 : Elements
JButton B24 = new JButton("Cr");
B24.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Chromium");
} else {
O.showMessageDialog(F,
"Discovered by - Nicholas Louis Vauquelin in 1798\nElement - Chromium\nSymbol - Cr\nGroup - 6\nPeriod - 4\nBlock - D\nAtomic Number - 24\nAtomic Mass - 51.996 u\nDensity (g/cm3) - 7.15\nBoiling Point - 2671 C, 4840 F, 2944 K\nMelting Point - 1907 C, 3465 F, 2180 K",
"Chromium (Cr)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B24.setFont(new Font("Serif", Font.BOLD, 20));
B24.setBackground(Color.BLACK);
B24.setForeground(Color.CYAN);
B24.setBounds(370, 179, 65, 40);
B24.setFocusPainted(false);
F.add(B24);
JButton B42 = new JButton("Mo");
B42.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Molybdenum");
} else {
O.showMessageDialog(F,
"Discovered by - Peter Jacob Hjelm in 1781\nElement - Molybdenum\nSymbol - Mo\nGroup - 6\nPeriod - 5\nBlock - D\nAtomic Number - 42\nAtomic Mass - 95.95 u\nDensity (g/cm3) - 10.2\nBoiling Point - 4639 C, 8382 F, 4912 K\nMelting Point - 2622 C, 4752 F, 2895 K",
"Molybdenum (Mo)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B42.setFont(new Font("Serif", Font.BOLD, 20));
B42.setBackground(Color.BLACK);
B42.setForeground(Color.CYAN);
B42.setBounds(370, 222, 65, 40);
B42.setFocusPainted(false);
F.add(B42);
JButton B60 = new JButton("Nd");
B60.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Neodymium");
} else {
O.showMessageDialog(F,
"Discovered by - Carl Auer von Welsbach in 1885\nElement - Neodymium\nSymbol - Nd\nGroup - Lanthanides\nPeriod - 6\nBlock - F\nAtomic Number - 60\nAtomic Mass - 144.242 u\nDensity (g/cm3) - 7.01\nBoiling Point - 3074 C, 5565 F, 3347 K\nMelting Point - 1016 C, 1861 F, 1289 K",
"Neodymium (Nd)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B60.setFont(new Font("Serif", Font.BOLD, 20));
B60.setBackground(Color.BLACK);
B60.setForeground(Color.MAGENTA.darker());
B60.setBounds(370, 370, 65, 40);
B60.setFocusPainted(false);
F.add(B60);
JButton B74 = new JButton("W");
B74.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Tungsten");
} else {
O.showMessageDialog(F,
"Discovered by - Juan and Fausto Elhuyar in 1783\nElement - Tungsten\nSymbol - W\nGroup - 6\nPeriod - 6\nBlock - D\nAtomic Number - 74\nAtomic Mass - 183.84 u\nDensity (g/cm3) - 19.3\nBoiling Point - 5555 C, 10031 F, 5828 K\nMelting Point - 3414 C, 6177 F, 3687 K",
"Tungsten (W)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B74.setFont(new Font("Serif", Font.BOLD, 20));
B74.setBackground(Color.BLACK);
B74.setForeground(Color.CYAN);
B74.setBounds(370, 265, 65, 40);
B74.setFocusPainted(false);
F.add(B74);
JButton B92 = new JButton("U");
B92.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Uranium");
} else {
O.showMessageDialog(F,
"Discovered by - Martin Heinrich Klaproth in 1789\nElement - Uranium\nSymbol - U\nGroup - Actinides\nPeriod - 7\nBlock - F\nAtomic Number - 92\nAtomic Mass - 238.029 u\nDensity (g/cm3) - 19.1\nBoiling Point - 4131 C, 7468 F, 4404 K\nMelting Point - 1135 C, 2075 F, 1408 K",
"Uranium (U)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B92.setFont(new Font("Serif", Font.BOLD, 20));
B92.setBackground(Color.BLACK);
B92.setForeground(Color.BLUE);
B92.setBounds(370, 413, 65, 40);
B92.setFocusPainted(false);
F.add(B92);
JButton B106 = new JButton("Sg");
B106.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Seaborgium");
} else {
O.showMessageDialog(F,
"Discovered by - Albert Ghiorso and colleagues in 1974\nElement - Seaborgium\nSymbol - Sg\nGroup - 6\nPeriod - 7\nBlock - D\nAtomic Number - 106\nAtomic Mass - [269] u\nDensity (g/cm3) - 23–24\nBoiling Point - Unknown\nMelting Point - Unknown",
"Seaborgium (Sg)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B106.setFont(new Font("Serif", Font.BOLD, 20));
B106.setBackground(Color.BLACK);
B106.setForeground(Color.CYAN);
B106.setBounds(370, 308, 65, 40);
B106.setFocusPainted(false);
F.add(B106);
// Group - 7 : Elements
JButton B25 = new JButton("Mn");
B25.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Manganese");
} else {
O.showMessageDialog(F,
"Discovered by - Johan Gottlieb Gahn in 1774\nElement - Manganese\nSymbol - Mn\nGroup - 7\nPeriod - 4\nBlock - D\nAtomic Number - 25\nAtomic Mass - 54.938 u\nDensity (g/cm3) - 7.3\nBoiling Point - 2061 C, 3742 F, 2334 K\nMelting Point - 1246 C, 2275 F, 1519 K",
"Manganese (Mn)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B25.setFont(new Font("Serif", Font.BOLD, 20));
B25.setBackground(Color.BLACK);
B25.setForeground(Color.CYAN);
B25.setBounds(438, 179, 65, 40);
B25.setFocusPainted(false);
F.add(B25);
JButton B43 = new JButton("Tc");
B43.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Technetium");
} else {
O.showMessageDialog(F,
"Discovered by - Carlo Perrier and Emilio Segre in 1937\nElement - Technetium\nSymbol - Tc\nGroup - 7\nPeriod - 5\nBlock - D\nAtomic Number - 43\nAtomic Mass - [98] u\nDensity (g/cm3) - 11\nBoiling Point - 4262 C, 7704 F, 4535 K\nMelting Point - 2157 C, 3915 F, 2430 K",
"Technetium (Tc)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B43.setFont(new Font("Serif", Font.BOLD, 20));
B43.setBackground(Color.BLACK);
B43.setForeground(Color.CYAN);
B43.setBounds(438, 222, 65, 40);
B43.setFocusPainted(false);
F.add(B43);
JButton B61 = new JButton("Pm");
B61.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Promethium");
} else {
O.showMessageDialog(F,
"Discovered by - Jacob .A. Marinsky, Lawrence E. Glendenin, and Charles D. Coryell in 1945\nElement - Promethium\nSymbol - Pm\nGroup - Lanthanides\nPeriod - 6\nBlock - F\nAtomic Number - 61\nAtomic Mass - [145] u\nDensity (g/cm3) - 7.26\nBoiling Point - 3000 C, 5432 F, 3273 K\nMelting Point - 1042 C, 1908 F, 1315 K",
"Promethium (Pm)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B61.setFont(new Font("Serif", Font.BOLD, 20));
B61.setBackground(Color.BLACK);
B61.setForeground(Color.MAGENTA.darker());
B61.setBounds(438, 370, 65, 40);
B61.setFocusPainted(false);
F.add(B61);
JButton B75 = new JButton("Re");
B75.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Rhenium");
} else {
O.showMessageDialog(F,
"Discovered by - Walter Noddack, Ida Tacke and Otto Berg in 1925\nElement - Rhenium\nSymbol - Re\nGroup - 7\nPeriod - 6\nBlock - D\nAtomic Number - 75\nAtomic Mass - 186.207 u\nDensity (g/cm3) - 20.8\nBoiling Point - 5590 C, 10094 F, 5863 K\nMelting Point - 3185 C, 5765 F, 3458 K",
"Rhenium (Re)", JOptionPane.PLAIN_MESSAGE);
}
}
});
B75.setFont(new Font("Serif", Font.BOLD, 20));
B75.setBackground(Color.BLACK);
B75.setForeground(Color.CYAN);
B75.setBounds(438, 265, 65, 40);
B75.setFocusPainted(false);
F.add(B75);
JButton B93 = new JButton("Np");
B93.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent Ae) {
if (T.isSelected()) {
Open("https://en.wikipedia.org/wiki/Neptunium");