Anda di halaman 1dari 25

Listing Program Dan Output Tabel Periodik

Matakuliah Pemrograman Berbasis Object 2


Kelas Pagi

RAHIDAH ASIYAH JAYA [201712033]


 Listing program table Periodik
import java.awt.Color;
import javax.swing.*;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class TabelPeriodikCia extends JFrame implements ActionListener {

JButton p1a = new JButton("H"); JButton p1b = new JButton("Li");


JButton p1c = new JButton("Na"); JButton p1d = new JButton("K");
JButton p1e = new JButton("Rb"); JButton p1f = new JButton("Cs");
JButton p1g = new JButton("Fr");

JButton p2b = new JButton("Be"); JButton p2c = new JButton("Mg");


JButton p2d = new JButton("Ca"); JButton p2e = new JButton("Sr");
JButton p2f = new JButton("Ba"); JButton p2g = new JButton("Ra");

JButton p3d = new JButton("Sc"); JButton p3e = new JButton("Y");


JButton p3f = new JButton(""); JButton p3g = new JButton("");

JButton p4d = new JButton("Ti"); JButton p4e = new JButton("Zr");


JButton p4f = new JButton("Hf"); JButton p4g = new JButton("Rf");

JButton p5d = new JButton("V"); JButton p5e = new JButton("Nb");


JButton p5f = new JButton("Ta"); JButton p5g = new JButton("Db");

JButton p6d = new JButton("Cr"); JButton p6e = new JButton("Mo");


JButton p6f = new JButton("W"); JButton p6g = new JButton("Sg");

JButton p7d = new JButton("Mn"); JButton p7e = new JButton("Tc");


JButton p7f = new JButton("Re"); JButton p7g = new JButton("Bh");

JButton p8d = new JButton("Fe"); JButton p8e = new JButton("Ru");


JButton p8f = new JButton("Os"); JButton p8g = new JButton("Hs");

JButton p9d = new JButton("Co"); JButton p9e = new JButton("Rh");


JButton p9f = new JButton("Ir"); JButton p9g = new JButton("Mt");

JButton p10d = new JButton("Ni");JButton p10e = new JButton("Pd");


JButton p10f = new JButton("Pt");JButton p10g = new JButton("Ds");

JButton p11d = new JButton("Cu");JButton p11e = new JButton("Ag");


JButton p11f = new JButton("Au");JButton p11g = new JButton("Rg");

JButton p12d = new JButton("Zn");JButton p12e = new JButton("Cd");


JButton p12f = new JButton("Hg");JButton p12g = new JButton("Cn");

JButton p13b = new JButton("B"); JButton p13c = new JButton("Al");


JButton p13d = new JButton("Ga");JButton p13e = new JButton("In");
JButton p13f = new JButton("Ti");JButton p13g = new JButton("Uut");

JButton p14b = new JButton("C"); JButton p14c = new JButton("Si");


JButton p14d = new JButton("Ge");JButton p14e = new JButton("Sn");
JButton p14f = new JButton("Pb");JButton p14g = new JButton("FI");
JButton p15b = new JButton("N"); JButton p15c = new JButton("P");
JButton p15d = new JButton("As");JButton p15e = new JButton("Sb");
JButton p15f = new JButton("Bi");JButton p15g = new JButton("Uup");

JButton p16b = new JButton("O"); JButton p16c = new JButton("S");


JButton p16d = new JButton("Se");JButton p16e = new JButton("Te");
JButton p16f = new JButton("Po");JButton p16g = new JButton("Lv");

JButton p17b = new JButton("F"); JButton p17c = new JButton("CI");


JButton p17d = new JButton("Br");JButton p17e = new JButton("I");
JButton p17f = new JButton("At");JButton p17g = new JButton("Uus");

JButton p18a = new JButton("He");JButton p18b = new JButton("Ne");


JButton p18c = new JButton("Ar");JButton p18d = new JButton("Kr");
JButton p18e = new JButton("Xe");JButton p18f = new JButton("Rn");
JButton p18g = new JButton("Uuo");

JButton z1a = new JButton("La");JButton z2a = new JButton("Ce");


JButton z3a = new JButton("Pr");JButton z4a = new JButton("Nd");
JButton z5a = new JButton("Pm");JButton z6a = new JButton("Sm");
JButton z7a = new JButton("Eu");JButton z8a = new JButton("Gd");
JButton z9a = new JButton("Tb");JButton z10a = new JButton("Dy");
JButton z11a = new JButton("Ho");JButton z12a = new JButton("Er");
JButton z13a = new JButton("Tm");JButton z14a = new JButton("Yb");

JButton z1b = new JButton("Ac");JButton z2b = new JButton("Th");


JButton z3b = new JButton("Pa");JButton z4b = new JButton("U");
JButton z5b = new JButton("Np");JButton z6b = new JButton("Pu");
JButton z7b = new JButton("Am");JButton z8b = new JButton("Cm");
JButton z9b = new JButton("Bk");JButton z10b = new JButton("Cf");
JButton z11b = new JButton("Es");JButton z12b = new JButton("Fm");
JButton z13b = new JButton("Md");JButton z14b = new JButton("No");

JTextArea isi = new JTextArea();


JLabel judulisi = new JLabel("PENJELASAN UNSUR TABEL");
JLabel judul = new JLabel("Periodic Table Of The Elements");
JLabel judul1 = new JLabel("Lanthanide Series");
JLabel judul2 = new JLabel("Actinide Series");
JLabel ket1 = new JLabel("I A");
JLabel ket2 = new JLabel("II A");
JLabel ket3 = new JLabel("III B");
JLabel ket4 = new JLabel("IV B");
JLabel ket5 = new JLabel("V B");
JLabel ket6 = new JLabel("VI B");
JLabel ket7 = new JLabel("VII B");
JLabel ket8 = new JLabel("<-------- VII B -------->");
JLabel ket9 = new JLabel("I B");
JLabel ket10 = new JLabel("II B");
JLabel ket11 = new JLabel("III A");
JLabel ket12 = new JLabel("IV A");
JLabel ket13 = new JLabel("V A");
JLabel ket14 = new JLabel("VI A");
JLabel ket15 = new JLabel("VII A");
JLabel ket16 = new JLabel("VIII A");
public TabelPeriodikCia()
{
setLayout(null);
setVisible(true);

setLocationRelativeTo(null);
//textarea
add(isi); isi.setBounds(920,350,300,130);
//judul PENJELASAN UNSUR TABEL
add(judulisi);
judulisi.setBounds(1000,30,400,600);
//judul Periodic Table Of The Elements
add(judul); judul.setBounds(320,10,180,80);
//judul Lanthanide Series
add(judul1);judul1.setBounds(20,320,150,100);
//utk judul Actinide Series
add(judul2);judul2.setBounds(26,360,150,100);
//untuk tulisan atas beserta tataletaknya

add(ket1);add(ket2);add(ket3);add(ket4);add(ket5);add(ket6);add(ket7);
add(ket8);add(ket9);add(ket10);add(ket11);add(ket12);add(ket13);add(ket14);
add(ket15);add(ket16);

ket1.setBounds(40,2,55,40); ket2.setBounds(95,42,55,40);
ket3.setBounds(151,120,55,40); ket4.setBounds(206,120,55,40);
ket5.setBounds(261,120,55,40); ket6.setBounds(316,120,55,40);
ket7.setBounds(370,120,55,40); ket8.setBounds(433,120,120,40);
ket9.setBounds(590,120,55,40); ket10.setBounds(645,120,55,40);
ket11.setBounds(700,42,55,40); ket12.setBounds(755,42,55,40);
ket13.setBounds(810,42,55,40); ket14.setBounds(865,42,55,40);
ket15.setBounds(920,42,55,40); ket16.setBounds(975,2,55,40);
//memanggil button
add(p1a); add(p1b); add(p1c); add(p1d); add(p1e); add(p1f); add(p1g);
add(p2b); add(p2c); add(p2d); add(p2e); add(p2f); add(p2g);
add(p3d); add(p3e); add(p3f); add(p3g);
add(p4d); add(p4e); add(p4f); add(p4g);
add(p5d); add(p5e); add(p5f); add(p5g);
add(p6d); add(p6e); add(p6f); add(p6g);
add(p7d); add(p7e); add(p7f); add(p7g);
add(p8d); add(p8e); add(p8f); add(p8g);
add(p9d); add(p9e); add(p9f); add(p9g);
add(p10d); add(p10e); add(p10f); add(p10g);
add(p11d); add(p11e); add(p11f); add(p11g);
add(p12d); add(p12e); add(p12f); add(p12g);
add(p13b); add(p13c); add(p13d); add(p13e); add(p13f); add(p13g);
add(p14b); add(p14c); add(p14d); add(p14e); add(p14f); add(p14g);
add(p15b); add(p15c); add(p15d); add(p15e); add(p15f); add(p15g);
add(p16b); add(p16c); add(p16d); add(p16e); add(p16f); add(p16g);
add(p17b); add(p17c); add(p17d); add(p17e); add(p17f); add(p17g);
add(p18a); add(p18b); add(p18c); add(p18d); add(p18e); add(p18f); add(p18g);
add(z1a); add(z2a); add(z3a); add(z4a); add(z5a); add(z6a); add(z7a);
add(z8a); add(z9a); add(z10a); add(z11a); add(z12a); add(z13a); add(z14a);
add(z1b); add(z2b); add(z3b); add(z4b); add(z5b); add(z6b); add(z7b);
add(z8b); add(z9b); add(z10b); add(z11b); add(z12b); add(z13b); add(z14b);

//tata letak ukuran set bound


//set background utk mewarnai tombol
//setforeground utk warna tulisan dlm button

p1a.setBounds(20,30,55,40);//horizontal,tinggi(vertikal),pjgkomponen
p1a.setForeground(Color.white); p1a.setBackground(Color.BLUE);
p1b.setBounds(20,70,55,40);
p1b.setForeground(Color.white); p1b.setBackground(Color.RED);
p1c.setBounds(20,110,55,40);
p1c.setForeground(Color.white); p1c.setBackground(Color.RED);
p1d.setBounds(20,150,55,40);
p1d.setForeground(Color.white); p1d.setBackground(Color.RED);
p1e.setBounds(20,190,55,40);
p1e.setForeground(Color.white); p1e.setBackground(Color.RED);
p1f.setBounds(20,230,55,40);
p1f.setForeground(Color.white); p1f.setBackground(Color.RED);
p1g.setBounds(20,270,55,40);
p1g.setForeground(Color.white); p1g.setBackground(Color.RED);

p2b.setBounds(75,70,55,40);
p2b.setForeground(Color.WHITE); p2b.setBackground(Color.ORANGE);
p2c.setBounds(75,110,55,40);
p2c.setForeground(Color.WHITE); p2c.setBackground(Color.ORANGE);
p2d.setBounds(75,150,55,40);
p2d.setForeground(Color.WHITE); p2d.setBackground(Color.ORANGE);
p2e.setBounds(75,190,55,40);
p2e.setForeground(Color.WHITE); p2e.setBackground(Color.ORANGE);
p2f.setBounds(75,230,55,40);
p2f.setForeground(Color.WHITE); p2f.setBackground(Color.ORANGE);
p2g.setBounds(75,270,55,40);
p2g.setForeground(Color.WHITE); p2g.setBackground(Color.ORANGE);

p3d.setBounds(130,150,55,40);
p3d.setForeground(Color.BLACK); p3d.setBackground(Color.YELLOW);
p3e.setBounds(130,190,55,40);
p3e.setForeground(Color.BLACK); p3e.setBackground(Color.YELLOW);
p3f.setBounds(130,230,55,40);
p3f.setForeground(Color.BLACK); p3f.setBackground(Color.LIGHT_GRAY);
p3g.setBounds(130,270,55,40);
p3g.setForeground(Color.BLACK); p3g.setBackground(Color.DARK_GRAY);

p4d.setBounds(185,150,55,40);
p4d.setForeground(Color.BLACK); p4d.setBackground(Color.YELLOW);
p4e.setBounds(185,190,55,40);
p4e.setForeground(Color.BLACK); p4e.setBackground(Color.YELLOW);
p4f.setBounds(185,230,55,40);
p4f.setForeground(Color.BLACK); p4f.setBackground(Color.YELLOW);
p4g.setBounds(185,270,55,40);
p4g.setForeground(Color.BLACK); p4g.setBackground(Color.YELLOW);

p5d.setBounds(240,150,55,40);
p5d.setForeground(Color.BLACK); p5d.setBackground(Color.YELLOW);
p5e.setBounds(240,190,55,40);
p5e.setForeground(Color.BLACK); p5e.setBackground(Color.YELLOW);
p5f.setBounds(240,230,55,40);
p5f.setForeground(Color.BLACK); p5f.setBackground(Color.YELLOW);
p5g.setBounds(240,270,55,40);
p5g.setForeground(Color.BLACK); p5g.setBackground(Color.YELLOW);
p6d.setBounds(295,150,55,40);
p6d.setForeground(Color.BLACK); p6d.setBackground(Color.YELLOW);
p6e.setBounds(295,190,55,40);
p6e.setForeground(Color.BLACK); p6e.setBackground(Color.YELLOW);
p6f.setBounds(295,230,55,40);
p6f.setForeground(Color.BLACK); p6f.setBackground(Color.YELLOW);
p6g.setBounds(295,270,55,40);
p6g.setForeground(Color.BLACK); p6g.setBackground(Color.YELLOW);

p7d.setBounds(350,150,55,40);
p7d.setForeground(Color.BLACK); p7d.setBackground(Color.YELLOW);
p7e.setBounds(350,190,55,40);
p7e.setForeground(Color.BLACK); p7e.setBackground(Color.YELLOW);
p7f.setBounds(350,230,55,40);
p7f.setForeground(Color.BLACK); p7f.setBackground(Color.YELLOW);
p7g.setBounds(350,270,55,40);
p7g.setForeground(Color.BLACK); p7g.setBackground(Color.YELLOW);

p8d.setBounds(405,150,55,40);
p8d.setForeground(Color.BLACK); p8d.setBackground(Color.YELLOW);
p8e.setBounds(405,190,55,40);
p8e.setForeground(Color.BLACK); p8e.setBackground(Color.YELLOW);
p8f.setBounds(405,230,55,40);
p8f.setForeground(Color.BLACK); p8f.setBackground(Color.YELLOW);
p8g.setBounds(405,270,55,40);
p8g.setForeground(Color.BLACK); p8g.setBackground(Color.YELLOW);

p9d.setBounds(460,150,55,40);
p9d.setForeground(Color.BLACK); p9d.setBackground(Color.YELLOW);
p9e.setBounds(460,190,55,40);
p9e.setForeground(Color.BLACK); p9e.setBackground(Color.YELLOW);
p9f.setBounds(460,230,55,40);
p9f.setForeground(Color.BLACK); p9f.setBackground(Color.YELLOW);
p9g.setBounds(460,270,55,40);
p9g.setForeground(Color.BLACK); p9g.setBackground(Color.YELLOW);

p10d.setBounds(515,150,55,40);
p10d.setForeground(Color.BLACK); p10d.setBackground(Color.YELLOW);
p10e.setBounds(515,190,55,40);
p10e.setForeground(Color.BLACK); p10e.setBackground(Color.YELLOW);
p10f.setBounds(515,230,55,40);
p10f.setForeground(Color.BLACK); p10f.setBackground(Color.YELLOW);
p10g.setBounds(515,270,55,40);
p10g.setForeground(Color.BLACK); p10g.setBackground(Color.YELLOW);

p11d.setBounds(570,150,55,40);
p11d.setForeground(Color.BLACK); p11d.setBackground(Color.YELLOW);
p11e.setBounds(570,190,55,40);
p11e.setForeground(Color.BLACK); p11e.setBackground(Color.YELLOW);
p11f.setBounds(570,230,55,40);
p11f.setForeground(Color.BLACK); p11f.setBackground(Color.YELLOW);
p11g.setBounds(570,270,55,40);
p11g.setForeground(Color.BLACK); p11g.setBackground(Color.YELLOW);

p12d.setBounds(625,150,55,40);
p12d.setForeground(Color.BLACK); p12d.setBackground(Color.YELLOW);
p12e.setBounds(625,190,55,40);
p12e.setForeground(Color.BLACK); p12e.setBackground(Color.YELLOW);
p12f.setBounds(625,230,55,40);
p12f.setForeground(Color.BLACK); p12f.setBackground(Color.YELLOW);
p12g.setBounds(625,270,55,40);
p12g.setForeground(Color.BLACK); p12g.setBackground(Color.YELLOW);

p13b.setBounds(680,70,55,40);
p13b.setForeground(Color.BLACK); p13b.setBackground(Color.CYAN);
p13c.setBounds(680,110,55,40);
p13c.setForeground(Color.BLACK); p13c.setBackground(Color.DARK_GRAY);
p13d.setBounds(680,150,55,40);
p13d.setForeground(Color.BLACK); p13d.setBackground(Color.DARK_GRAY);
p13e.setBounds(680,190,55,40);
p13e.setForeground(Color.BLACK); p13e.setBackground(Color.DARK_GRAY);
p13f.setBounds(680,230,55,40);
p13f.setForeground(Color.BLACK); p13f.setBackground(Color.DARK_GRAY);
p13g.setBounds(680,270,55,40);
p13g.setForeground(Color.BLACK); p13g.setBackground(Color.DARK_GRAY);

p14b.setBounds(735,70,56,40);
p14b.setForeground(Color.BLACK); p14b.setBackground(Color.BLUE);
p14c.setBounds(735,110,56,40);
p14c.setForeground(Color.BLACK); p14c.setBackground(Color.CYAN);
p14d.setBounds(735,150,56,40);
p14d.setForeground(Color.BLACK); p14d.setBackground(Color.CYAN);
p14e.setBounds(735,190,56,40);
p14e.setForeground(Color.BLACK); p14e.setBackground(Color.DARK_GRAY);
p14f.setBounds(735,230,56,40);
p14f.setForeground(Color.BLACK); p14f.setBackground(Color.DARK_GRAY);
p14g.setBounds(735,270,56,40);
p14g.setForeground(Color.BLACK); p14g.setBackground(Color.DARK_GRAY);

p15b.setBounds(791,70,56,40);
p15b.setForeground(Color.BLACK); p15b.setBackground(Color.BLUE);
p15c.setBounds(791,110,56,40);
p15c.setForeground(Color.BLACK); p15c.setBackground(Color.BLUE);
p15d.setBounds(791,150,56,40);
p15d.setForeground(Color.BLACK); p15d.setBackground(Color.CYAN);
p15e.setBounds(791,190,56,40);
p15e.setForeground(Color.BLACK); p15e.setBackground(Color.CYAN);
p15f.setBounds(791,230,56,40);
p15f.setForeground(Color.BLACK); p15f.setBackground(Color.DARK_GRAY);
p15g.setBounds(791,270,56,40);
p15g.setForeground(Color.BLACK); p15g.setBackground(Color.DARK_GRAY);

p16b.setBounds(847,70,56,40);
p16b.setForeground(Color.BLACK); p16b.setBackground(Color.BLUE);
p16c.setBounds(847,110,56,40);
p16c.setForeground(Color.BLACK); p16c.setBackground(Color.BLUE);
p16d.setBounds(847,150,56,40);
p16d.setForeground(Color.BLACK); p16d.setBackground(Color.BLUE);
p16e.setBounds(847,190,56,40);
p16e.setForeground(Color.BLACK); p16e.setBackground(Color.CYAN);
p16f.setBounds(847,230,56,40);
p16f.setForeground(Color.BLACK); p16f.setBackground(Color.CYAN);
p16g.setBounds(847,270,56,40);
p16g.setForeground(Color.BLACK); p16g.setBackground(Color.DARK_GRAY);

p17b.setBounds(903,70,56,40);
p17b.setForeground(Color.BLACK); p17b.setBackground(Color.PINK);
p17c.setBounds(903,110,56,40);
p17c.setForeground(Color.BLACK); p17c.setBackground(Color.PINK);
p17d.setBounds(903,150,56,40);
p17d.setForeground(Color.BLACK); p17d.setBackground(Color.PINK);
p17e.setBounds(903,190,56,40);
p17e.setForeground(Color.BLACK); p17e.setBackground(Color.PINK);
p17f.setBounds(903,230,56,40);
p17f.setForeground(Color.BLACK); p17f.setBackground(Color.PINK);
p17g.setBounds(903,270,56,40);
p17g.setForeground(Color.BLACK); p17g.setBackground(Color.PINK);

p18a.setBounds(959,30,56,40);
p18a.setForeground(Color.BLACK); p18a.setBackground(Color.MAGENTA);
p18b.setBounds(959,70,56,40);
p18b.setForeground(Color.BLACK); p18b.setBackground(Color.MAGENTA);
p18c.setBounds(959,110,56,40);
p18c.setForeground(Color.BLACK); p18c.setBackground(Color.MAGENTA);
p18d.setBounds(959,150,56,40);
p18d.setForeground(Color.BLACK); p18d.setBackground(Color.MAGENTA);
p18e.setBounds(959,190,56,40);
p18e.setForeground(Color.BLACK); p18e.setBackground(Color.MAGENTA);
p18f.setBounds(959,230,56,40);
p18f.setForeground(Color.BLACK); p18f.setBackground(Color.MAGENTA);
p18g.setBounds(959,270,56,40);
p18g.setForeground(Color.BLACK); p18g.setBackground(Color.MAGENTA);

z1a.setBounds(130,350,55,40);
z1a.setForeground(Color.BLACK); z1a.setBackground(Color.LIGHT_GRAY);
z2a.setBounds(185,350,55,40);
z2a.setForeground(Color.BLACK); z2a.setBackground(Color.LIGHT_GRAY);
z3a.setBounds(240,350,55,40);
z3a.setForeground(Color.BLACK); z3a.setBackground(Color.LIGHT_GRAY);
z4a.setBounds(295,350,55,40);
z4a.setForeground(Color.BLACK); z4a.setBackground(Color.LIGHT_GRAY);
z5a.setBounds(350,350,55,40);
z5a.setForeground(Color.BLACK); z5a.setBackground(Color.LIGHT_GRAY);
z6a.setBounds(405,350,55,40);
z6a.setForeground(Color.BLACK); z6a.setBackground(Color.LIGHT_GRAY);
z7a.setBounds(460,350,55,40);
z7a.setForeground(Color.BLACK); z7a.setBackground(Color.LIGHT_GRAY);
z8a.setBounds(515,350,55,40);
z8a.setForeground(Color.BLACK); z8a.setBackground(Color.LIGHT_GRAY);
z9a.setBounds(570,350,55,40);
z9a.setForeground(Color.BLACK); z9a.setBackground(Color.LIGHT_GRAY);
z10a.setBounds(625,350,55,40);
z10a.setForeground(Color.BLACK);
z10a.setBackground(Color.LIGHT_GRAY);
z11a.setBounds(680,350,55,40);
z11a.setForeground(Color.BLACK);
z11a.setBackground(Color.LIGHT_GRAY);
z12a.setBounds(735,350,55,40);
z12a.setForeground(Color.BLACK);
z12a.setBackground(Color.LIGHT_GRAY);
z13a.setBounds(790,350,55,40);
z13a.setForeground(Color.BLACK);
z13a.setBackground(Color.LIGHT_GRAY);
z14a.setBounds(845,350,55,40);
z14a.setForeground(Color.BLACK);
z14a.setBackground(Color.LIGHT_GRAY);

z1b.setBounds(130,390,55,40);
z1b.setForeground(Color.BLACK); z1b.setBackground(Color.DARK_GRAY);
z2b.setBounds(185,390,55,40);
z2b.setForeground(Color.BLACK); z2b.setBackground(Color.DARK_GRAY);
z3b.setBounds(240,390,55,40);
z3b.setForeground(Color.BLACK); z3b.setBackground(Color.DARK_GRAY);
z4b.setBounds(295,390,55,40);
z4b.setForeground(Color.BLACK); z4b.setBackground(Color.DARK_GRAY);
z5b.setBounds(350,390,55,40);
z5b.setForeground(Color.BLACK); z5b.setBackground(Color.DARK_GRAY);
z6b.setBounds(405,390,55,40);
z6b.setForeground(Color.BLACK); z6b.setBackground(Color.DARK_GRAY);
z7b.setBounds(460,390,55,40);
z7b.setForeground(Color.BLACK); z7b.setBackground(Color.DARK_GRAY);
z8b.setBounds(515,390,55,40);
z8b.setForeground(Color.BLACK); z8b.setBackground(Color.DARK_GRAY);
z9b.setBounds(570,390,55,40);
z9b.setForeground(Color.BLACK); z9b.setBackground(Color.DARK_GRAY);
z10b.setBounds(625,390,55,40);
z10b.setForeground(Color.BLACK); z10b.setBackground(Color.DARK_GRAY);
z11b.setBounds(680,390,55,40);
z11b.setForeground(Color.BLACK); z11b.setBackground(Color.DARK_GRAY);
z12b.setBounds(735,390,55,40);
z12b.setForeground(Color.BLACK); z12b.setBackground(Color.DARK_GRAY);
z13b.setBounds(790,390,55,40);
z13b.setForeground(Color.BLACK); z13b.setBackground(Color.DARK_GRAY);
z14b.setBounds(845,390,55,40);
z14b.setForeground(Color.BLACK); z14b.setBackground(Color.DARK_GRAY);

p1a.setToolTipText("Hidrogen"); p1b.setToolTipText("Lithium");
p1c.setToolTipText("Natrium"); p1d.setToolTipText("Pottasium");
p1e.setToolTipText("Rubidium"); p1f.setToolTipText("Cesium");
p1g.setToolTipText("Francius");

p2b.setToolTipText("Beryllium");p2c.setToolTipText("Magnesium");
p2d.setToolTipText("Calcium"); p2e.setToolTipText("Strontium");
p2f.setToolTipText("Barium"); p2g.setToolTipText("Radium");

p3d.setToolTipText("Scandium"); p3e.setToolTipText("Yttrium");

p4d.setToolTipText("Titanium"); p4e.setToolTipText("Zirconium");
p4f.setToolTipText("Hafnium"); p4g.setToolTipText("Rutherfordium");

p5d.setToolTipText("Vanadium"); p5e.setToolTipText("Niobium");
p5f.setToolTipText("Tantalum"); p5g.setToolTipText("Dubnium");

p6d.setToolTipText("Chromium"); p6e.setToolTipText("Molybdenum");
p6f.setToolTipText("Tungsten"); p6g.setToolTipText("Seaborgium");
p7d.setToolTipText("Manganese");p7e.setToolTipText("Technetium");
p7f.setToolTipText("Rhenium"); p7g.setToolTipText("Bohrium");

p8d.setToolTipText("Iron"); p8e.setToolTipText("Ruthenium");
p8f.setToolTipText("Osmium"); p8g.setToolTipText("Hassium");

p9d.setToolTipText("Cobalt"); p9e.setToolTipText("Rhodium");
p9f.setToolTipText("Iridium"); p9g.setToolTipText("Meitnerium");

p10d.setToolTipText("Nickel"); p10e.setToolTipText("Palladium");
p10f.setToolTipText("Platinum");p10g.setToolTipText("Darmstadtium");

p11d.setToolTipText("Copper"); p11e.setToolTipText("Silver");
p11f.setToolTipText("Gold"); p11g.setToolTipText("Roentgenium");

p12d.setToolTipText("Zinc"); p12e.setToolTipText("Cadmium");
p12f.setToolTipText("Mercury"); p12g.setToolTipText("Copernium");

p13b.setToolTipText("Boron"); p13c.setToolTipText("Aluminium");
p13d.setToolTipText("Galium"); p13e.setToolTipText("Indium");
p13f.setToolTipText("Talium"); p13g.setToolTipText("Nihonium");

p14b.setToolTipText("Karbon"); p14c.setToolTipText("Silikon");
p14d.setToolTipText("Germanium"); p14e.setToolTipText("Timah");
p14f.setToolTipText("Timbal"); p14g.setToolTipText("Flerovium");

p15b.setToolTipText("Nitrogen");p15c.setToolTipText("Fosfor");
p15d.setToolTipText("Arsen"); p15e.setToolTipText("Antimon");
p15f.setToolTipText("Bismut"); p15g.setToolTipText("Moskovium");

p16b.setToolTipText("Oksigen"); p16c.setToolTipText("Belerang");
p16d.setToolTipText("Selenium");p16e.setToolTipText("Telurium");
p16f.setToolTipText("Polonium");p16g.setToolTipText("Livermorium");

p17b.setToolTipText("Fluor"); p17c.setToolTipText("Klorin");
p17d.setToolTipText("Bromin"); p17e.setToolTipText("Lodin");
p17f.setToolTipText("Astatin"); p17g.setToolTipText("Tenesin");

p18a.setToolTipText("Helium"); p18b.setToolTipText("Neon");
p18c.setToolTipText("Argon"); p18d.setToolTipText("Kripton");
p18e.setToolTipText("Xenon"); p18f.setToolTipText("Radon");
p18g.setToolTipText("Oganeson");

z1a.setToolTipText("Lantanum"); z2a.setToolTipText("Serium");
z3a.setToolTipText("Praseodimium"); z4a.setToolTipText("Neodimium");
z5a.setToolTipText("Prometium"); z6a.setToolTipText("Samarium");
z7a.setToolTipText("Europium"); z8a.setToolTipText("Gadolinium");
z9a.setToolTipText("Terbium"); z10a.setToolTipText("Disprosium");
z11a.setToolTipText("Holmium"); z12a.setToolTipText("Erbium");
z13a.setToolTipText("Tulium"); z14a.setToolTipText("Iterbium");

z1b.setToolTipText("Aktinium"); z2b.setToolTipText("Torium");
z3b.setToolTipText("Protaktinium"); z4b.setToolTipText("Uranium");
z5b.setToolTipText("Neptunium"); z6b.setToolTipText("Plutonium");
z7b.setToolTipText("Amerisium"); z8b.setToolTipText("Curium");
z9b.setToolTipText("Berkelium"); z10b.setToolTipText("Kalifornium");
z11b.setToolTipText("Einsteinium"); z12b.setToolTipText("Fermium");
z13b.setToolTipText("Mendelevium"); z14b.setToolTipText("Nobelium");

p1a.addActionListener(this); p1b.addActionListener(this);
p1c.addActionListener(this); p1d.addActionListener(this);
p1e.addActionListener(this); p1f.addActionListener(this);
p1g.addActionListener(this);

p2b.addActionListener(this); p2c.addActionListener(this);
p2d.addActionListener(this); p2e.addActionListener(this);
p2f.addActionListener(this); p2g.addActionListener(this);

p3d.addActionListener(this); p3e.addActionListener(this);
p3f.addActionListener(this); p3g.addActionListener(this);

p4d.addActionListener(this); p4e.addActionListener(this);
p4f.addActionListener(this); p4g.addActionListener(this);

p5d.addActionListener(this); p5e.addActionListener(this);
p5f.addActionListener(this); p5g.addActionListener(this);

p6d.addActionListener(this); p6e.addActionListener(this);
p6f.addActionListener(this); p6g.addActionListener(this);

p7d.addActionListener(this); p7e.addActionListener(this);
p7f.addActionListener(this); p7g.addActionListener(this);

p8d.addActionListener(this); p8e.addActionListener(this);
p8f.addActionListener(this); p8g.addActionListener(this);

p9d.addActionListener(this); p9e.addActionListener(this);
p9f.addActionListener(this); p9g.addActionListener(this);

p10d.addActionListener(this); p10e.addActionListener(this);
p10f.addActionListener(this); p10g.addActionListener(this);

p11d.addActionListener(this); p11e.addActionListener(this);
p11f.addActionListener(this); p11g.addActionListener(this);

p12d.addActionListener(this); p12e.addActionListener(this);
p12f.addActionListener(this); p12g.addActionListener(this);

p13b.addActionListener(this); p13c.addActionListener(this);
p13d.addActionListener(this); p13e.addActionListener(this);
p13f.addActionListener(this); p13g.addActionListener(this);

p14b.addActionListener(this); p14c.addActionListener(this);
p14d.addActionListener(this); p14e.addActionListener(this);
p14f.addActionListener(this); p14g.addActionListener(this);

p15b.addActionListener(this); p15c.addActionListener(this);
p15d.addActionListener(this); p15e.addActionListener(this);
p15f.addActionListener(this); p15g.addActionListener(this);

p16b.addActionListener(this); p16c.addActionListener(this);
p16d.addActionListener(this); p16e.addActionListener(this);
p16f.addActionListener(this); p16g.addActionListener(this);
p17b.addActionListener(this); p17c.addActionListener(this);
p17d.addActionListener(this); p17e.addActionListener(this);
p17f.addActionListener(this); p17g.addActionListener(this);

p18a.addActionListener(this); p18b.addActionListener(this);
p18c.addActionListener(this); p18d.addActionListener(this);
p18e.addActionListener(this); p18f.addActionListener(this);
p18g.addActionListener(this);

z1a.addActionListener(this); z2a.addActionListener(this);
z3a.addActionListener(this); z4a.addActionListener(this);
z5a.addActionListener(this); z6a.addActionListener(this);
z7a.addActionListener(this); z8a.addActionListener(this);
z9a.addActionListener(this); z10a.addActionListener(this);
z11a.addActionListener(this); z12a.addActionListener(this);
z13a.addActionListener(this); z14a.addActionListener(this);

z1b.addActionListener(this); z2b.addActionListener(this);
z3b.addActionListener(this); z4b.addActionListener(this);
z5b.addActionListener(this); z6b.addActionListener(this);
z7b.addActionListener(this); z8b.addActionListener(this);
z9b.addActionListener(this); z10b.addActionListener(this);
z11b.addActionListener(this); z12b.addActionListener(this);
z13b.addActionListener(this); z14b.addActionListener(this);
}
public void actionPerformed(ActionEvent ae) {
if (ae.getSource() == p1a) {
isi.setBackground(Color.BLUE);
isi.setForeground(Color.WHITE);
isi.setText("Hidrogen (bahasa Latin: hydrogenium, dari bahasa\n
Yunani: hydro: air, genes: membentuk adalah unsur\n kimia pada tabel periodik
yang memiliki simbol H\n dan nomor atom 1."); }
else if (ae.getSource() == p1b) {
isi.setBackground(Color.RED);
isi.setForeground(Color.WHITE);
isi.setText("Litium adalah suatu unsur kimia dalam tabel periodik\n
yang memiliki lambang Li dan nomor atom 3. "); }
else if(ae.getSource() == p1c) {
isi.setBackground(Color.RED);
isi.setForeground(Color.WHITE);
isi.setText("Natrium adalah suatu unsur kimia dalam tabel\nperiodik
yang memiliki lambang Na dan nomor atom\n11. Ini adalah logam lunak, putih
keperakan, dan\nsangat reaktif. "); }
else if (ae.getSource() == p1d) {
isi.setBackground(Color.RED);
isi.setForeground(Color.WHITE);
isi.setText("Kalium adalah suatu unsur kimia dalam tabel\nperiodik
yang memiliki lambang K dan nomor atom\n19. Dari bahasa Neo-Latin kalium. ");
}
else if (ae.getSource() == p1e) {
isi.setBackground(Color.RED);
isi.setForeground(Color.WHITE);
isi.setText("Rubidium adalah suatu unsur kimia dalam tabel\nperiodik
yang memiliki lambang Rb dan nomor atom\n37."); }
else if (ae.getSource() == p1f) {
isi.setBackground(Color.RED);
isi.setForeground(Color.WHITE);
isi.setText("Sesium adalah unsur kimia dalam tabel periodik\nyg
memiliki simbol Cs (dari nama Latinnya,Caesium)\ndan nomor atom 55."); }
else if (ae.getSource() == p1g) {
isi.setBackground(Color.RED);
isi.setForeground(Color.WHITE);
isi.setText("Fransium adalah unsur kimia dengan simbol Fr dan\nnomor
atom 87. Unsur ini dulunya dikenal dengan\nnama eka-caesium. "); }
else if (ae.getSource() == p2b) {
isi.setBackground(Color.ORANGE);
isi.setForeground(Color.WHITE);
isi.setText("Berilium adalah unsur kimia yg mempunyai simbol Be\ndan
nomor atom 4. Unsur ini beracun, bervalensi 2,\nberwarna abu-abu baja, kukuh,
ringan tetapi mudah\npecah."); }
else if (ae.getSource() == p2c) {
isi.setBackground(Color.ORANGE);
isi.setForeground(Color.WHITE);
isi.setText("Magnesium adalah suatu unsur kimia dalam
tabel\nperiodik yang memiliki lambang Mg dan nomor atom\n12."); }
else if (ae.getSource() == p2d) {
isi.setBackground(Color.ORANGE);
isi.setForeground(Color.WHITE);
isi.setText("Kalsium adalah sebuah elemen kimia dengan simbol\nCa
dan nomor atom 20. Mempunyai massa atom\n40.078 amu."); }
else if (ae.getSource() == p2e) {
isi.setBackground(Color.ORANGE);
isi.setForeground(Color.WHITE);
isi.setText("Stronsium adalah suatu unsur kimia dalam
tabel\nperiodik yang memiliki lambang Sr dan nomor atom\n38. "); }
else if (ae.getSource() == p2f) {
isi.setBackground(Color.ORANGE);
isi.setForeground(Color.WHITE);
isi.setText("Barium adalah suatu unsur kimia dalam tabel\nperiodik
yang memiliki lambang Ba dan nomor atom\n56. "); }
else if (ae.getSource() == p2g) {
isi.setBackground(Color.ORANGE);
isi.setForeground(Color.BLACK);
isi.setText("Radium adalah sebuah unsur kimia yang mempunyai\nsimbol
Ra dan nomor atom 88 Radium berwarna\nhampir putih bersih, tetapi akan
teroksidasi jika\nterekspos kepada udara dan berubah menjadi hitam.\nRadium
mempunyai tingkat radioaktivitas yang tinggi."); }
else if (ae.getSource() == p3d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Skandium adalah salah satu unsur kimia dalam
tabel\nperiodik yang memiliki lambang Sc dan nomor atom\n21. "); }
else if (ae.getSource() == p3e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Itrium adalah suatu unsur kimia dalam tabel
periodik\nyang memiliki lambang Y dan nomor atom 39."); }
else if (ae.getSource() == p3f) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText(""); }
else if (ae.getSource() == p3g) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText(""); }
else if (ae.getSource() == p4d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Titanium adalah sebuah unsur kimia dalam
tabel\nperiodik yg memiliki simbol Ti dan nomor atom 22. "); }
else if (ae.getSource() == p4e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Zirkonium adalah logam putih keabuan yang
jarang\ndijumpai di alam bebas. "); }
else if (ae.getSource() == p4f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Hafnium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Hf dan nomor atom 72."); }
else if (ae.getSource() == p4g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Ruterfordium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Rf dan nomor atom 104. "); }
else if (ae.getSource() == p5d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Vanadium adalah salah satu unsur kimia dalam
tabel\nperiodik yang memiliki lambang V dan nomor atom 23. "); }
else if (ae.getSource() == p5e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Niobium adalah suatu unsur kimia dalam
tabel\nperiodik yang memiliki lambang Nb dan nomor atom 41."); }
else if (ae.getSource() == p5f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Tantalum adalah suatu unsur kimia dalam
tabel\nperiodik yang memiliki lambang Ta dan nomor atom\n73. Unsur jenis
logam transisi ini sangat tahan korosi\ndan ditemukan pd mineral tantalit.
Tantalum digunakn\npada alat bedah dan implantasi karena tidak
bereaksi\ndengan cairan tubuh."); }
else if (ae.getSource() == p5g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Dubnium adalah unsur kimia dalam sistem
periodik\nunsur yang memiliki simbol Db dan nomor atom 105. "); }
else if (ae.getSource() == p6d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Kromium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Cr dan nomor atom 24. "); }
else if (ae.getSource() == p6e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Molibdenum adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Mo dan nomor atom 42. "); }
else if (ae.getSource() == p6f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Wolfram, dikenal juga sebagai Tungsten, adalah\nsuatu
unsur kimia dlm tabel periodik yg memiliki\nlambang W dan nomor atom 74. ");
}
else if (ae.getSource() == p6g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Seaborgium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Sg dan nomor atom 106."); }
else if (ae.getSource() == p7d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Mangan adalah unsur kimia dalam tabel periodik\nyang
memiliki lambang Mn dan nomor atom 25. "); }
else if (ae.getSource() == p7e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Teknesium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Tc dan nomor atom 43. "); }
else if (ae.getSource() == p7f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Rhenium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Re dan nomor atom 75."); }
else if (ae.getSource() == p7g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Bohrium adalah unsur kimia sintetik dalam
sistem\nperiodik unsur yang memiliki lambang Bh dan nomor\natom 107. "); }
else if (ae.getSource() == p8d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Besi adalah unsur kimia dengan simbol Fe dan
nomor\natom 26."); }
else if (ae.getSource() == p8e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Ruthenium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Ru dan nomor atom 44."); }
else if (ae.getSource() == p8f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Osmium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Os dan nomor atom 76."); }
else if (ae.getSource() == p8g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Hasium adalah unsur kimia sintetik dalam
sistem\nperiodik unsur yang memiliki lambang Hs dan nomor\natom 108."); }
else if (ae.getSource() == p9d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Kobalt adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Co dan nomor atom 27."); }
else if (ae.getSource() == p9e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Rhodium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Rh dan nomor atom 45."); }
else if (ae.getSource() == p9f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Iridium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Ir dan nomor atom 77."); }
else if (ae.getSource() == p9g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Meitnerium adalah unsur kimia dalam sistem\nperiodik
unsur yg memiliki lambang Mt dan nomor\natom 109."); }
else if (ae.getSource() == p10d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Nikel adalah unsur kimia metalik dalam
tabel\nperiodik yg memiliki simbol Ni dan nomor atom 28."); }
else if (ae.getSource() == p10e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Paladium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Pd dan nomor atom 46. "); }
else if (ae.getSource() == p10f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Platina adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Pt dan nomor atom 78. "); }
else if (ae.getSource() == p10g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Darmstadtium sebelumnya disebut Ununnilium,\nadalah
unsur kimia sintetik dlm sistem periodik unsur\nyg memiliki lambang Ds dan
nomor atom 110."); }
else if (ae.getSource() == p11d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Tembaga adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Cu dan nomor atom 29."); }
else if (ae.getSource() == p11e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Perak adalah unsur logam dengan nomor atom 47."); }
else if (ae.getSource() == p11f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Emas adalah unsur kimia dalam tabel periodik
yang\nmemiliki simbol Au dan nomor atom 79. "); }
else if (ae.getSource() == p11g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Roentgenium Tentang suara ini pelafalan adalah\nunsur
kimia sintetik dalam sistem periodik unsur\nyang memiliki lambang Rg dan
nomor atom 111. "); }
else if (ae.getSource() == p12d) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Seng /zink adalah unsur kimia dengan lambang
kimia\nZn, bernomor atom 30, dan massa atom relatif 65,39."); }
else if (ae.getSource() == p12e) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Kadmium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Cd dan nomor atom 48. "); }
else if (ae.getSource() == p12f) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Raksa/ merkuri / hydrargyrum adalah unsur kimia
pd\ntabel periodik dengan simbol Hg dan nomor atom 80."); }
else if (ae.getSource() == p12g) {
isi.setBackground(Color.YELLOW);
isi.setForeground(Color.BLACK);
isi.setText("Kopernisium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Cn (sebelumnya Uub)\ndan nomor atom 112.
"); }
else if (ae.getSource() == p13b) {
isi.setBackground(Color.CYAN);
isi.setForeground(Color.BLACK);
isi.setText("Boron adalah suatu unsur kimia dalam tabel
periodik\nyang memiliki lambang B dan nomor atom 5. Elemen\nmetaloid
trivalen, boron banyak terdapat di batu borax."); }
else if (ae.getSource() == p13c) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Aluminium ialah unsur kimia. Lambang aluminium\nialah
Al, dan nomor atomnya 13."); }
else if (ae.getSource() == p13d) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Gallium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Ga dan nomor atom 31. "); }
else if (ae.getSource() == p13e) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Indium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang In dan nomor atom 49."); }
else if (ae.getSource() == p13f) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Talium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Tl dan nomor atom 81."); }
else if (ae.getSource() == p13g) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Nihonium adalah unsur kimia sintetik dalam
sistem\nperiodik unsur yang memiliki lambang Nh dan nomor\natom 113. "); }
else if (ae.getSource() == p14b) {
isi.setBackground(Color.BLUE);
isi.setForeground(Color.WHITE);
isi.setText("Karbon atau zat arang merupakan unsur kimia
yang\nmempunyai simbol C dan nomor atom 6 pada tabel\nperiodik."); }
else if (ae.getSource() == p14c) {
isi.setBackground(Color.CYAN);
isi.setForeground(Color.BLACK);
isi.setText("Silikon adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Si dan nomor atom 14. "); }
else if (ae.getSource() == p14d) {
isi.setBackground(Color.CYAN);
isi.setForeground(Color.BLACK);
isi.setText("Germanium adalah unsur kimia dengan simbol Ge\ndan
nomor atom 32."); }
else if (ae.getSource() == p14e) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Timah adalah sebuah unsur kimia dalam tabel\nperiodik
yang memiliki simbol Sn dan nomor atom 50."); }
else if (ae.getSource() == p14f) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Timbal adalah unsur kimia dengan lambang Pb
dan\nnomor atom 82."); }
else if (ae.getSource() == p14g) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Flerovium adalah unsur kimia buatan dalam
sistem\nperiodik unsur yang memiliki lambang Fl dan nomor\natom 114."); }
else if (ae.getSource() == p15b) {
isi.setBackground(Color.BLUE);
isi.setForeground(Color.WHITE);
isi.setText("Nitrogen adalah suatu unsur kimia dalam
tabel\nperiodik yang memiliki lambang N dan nomor atom 7. "); }
else if (ae.getSource() == p15c) {
isi.setBackground(Color.BLUE);
isi.setForeground(Color.WHITE);
isi.setText("Fosforus adalah unsur kimia yang memiliki lambang\nP
dengan nomor atom 15. "); }
else if (ae.getSource() == p15d) {
isi.setBackground(Color.CYAN);
isi.setForeground(Color.BLACK);
isi.setText("Arsen, arsenik, atau arsenikum adalah unsur
kimia\ndlm tabel periodik yg memiliki simbol As dan no atom\n33. "); }
else if (ae.getSource() == p15e) {
isi.setBackground(Color.CYAN);
isi.setForeground(Color.BLACK);
isi.setText("Antimon adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Sb dan no atom 51."); }
else if (ae.getSource() == p15f) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Bismut adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Bi dan nomor atom 83."); }
else if (ae.getSource() == p15g) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Moskovium adalah unsur kimia dalam sistem\nperiodik
unsur yg memiliki lambang Mc dan nomor\natom 115."); }
else if (ae.getSource() == p16b) {
isi.setBackground(Color.BLUE);
isi.setForeground(Color.WHITE);
isi.setText("Oksigen atau zat asam adalah unsur kimia
yang\nmempunyai lambang O dan nomor atom 8. "); }
else if (ae.getSource() == p16c) {
isi.setBackground(Color.BLUE);
isi.setForeground(Color.WHITE);
isi.setText("Belerang atau sulfur adalah unsur kimia dlm
tabel\nperiodik yg memiliki lambang S dan nomor atom 16."); }
else if (ae.getSource() == p16d) {
isi.setBackground(Color.BLUE);
isi.setForeground(Color.WHITE);
isi.setText("Selenium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Se dan nomor atom 34. "); }
else if (ae.getSource() == p16e) {
isi.setBackground(Color.CYAN);
isi.setForeground(Color.BLACK);
isi.setText("Tellurium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Te dan nomor atom 52."); }
else if (ae.getSource() == p16f) {
isi.setBackground(Color.CYAN);
isi.setForeground(Color.BLACK);
isi.setText("Polonium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Po dan nomor atom 84. "); }
else if (ae.getSource() == p16g) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Livermorium adalah nama dari unsur kimia
buatan\nsuper berat dengan simbol Lv dan nomor atom 116. "); }
else if (ae.getSource() == p17b) {
isi.setBackground(Color.PINK);
isi.setForeground(Color.BLACK);
isi.setText("Fluor adalah suatu unsur kimia dalam tabel
periodik\nyg memiliki lambang F dan nomor atom 9. "); }
else if (ae.getSource() == p17c) {
isi.setBackground(Color.PINK);
isi.setForeground(Color.BLACK);
isi.setText("Klorin adalah unsur kimia dengan simbol Cl dan\nnomor
atom 17."); }
else if (ae.getSource() == p17d) {
isi.setBackground(Color.PINK);
isi.setForeground(Color.BLACK);
isi.setText("Bromin atau adalah unsur kimia pada tabel
periodik\nyang memiliki simbol Br dan nomor atom 35."); }
else if (ae.getSource() == p17e) {
isi.setBackground(Color.PINK);
isi.setForeground(Color.BLACK);
isi.setText("Iodin atau Iodium adalah unsur kimia pada
tabel\nperiodik yang memiliki simbol I dan nomor atom 53."); }
else if (ae.getSource() == p17f) {
isi.setBackground(Color.PINK);
isi.setForeground(Color.BLACK);
isi.setText("Astatin adalah suatu unsur kimia dalam
tabel\nperiodik yang memiliki lambang At dan nomor atom 85. "); }
else if (ae.getSource() == p17g) {
isi.setBackground(Color.PINK);
isi.setForeground(Color.BLACK);
isi.setText("Tenesin adalah nama sementara dari unsur
kimia\nbuatan super berat dengan simbol Ts dan nomor\natom 117. "); }
else if (ae.getSource() == p18a) {
isi.setBackground(Color.MAGENTA);
isi.setForeground(Color.BLACK);
isi.setText("Helium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang He dan nomor atom 2. "); }
else if (ae.getSource() == p18b) {
isi.setBackground(Color.MAGENTA);
isi.setForeground(Color.BLACK);
isi.setText("Neon adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Ne dan nomor atom 10. "); }
else if (ae.getSource() == p18c) {
isi.setBackground(Color.MAGENTA);
isi.setForeground(Color.BLACK);
isi.setText("Argon adalah unsur kimia dengan simbol Ar dan\nnomor
atom 18."); }
else if (ae.getSource() == p18d) {
isi.setBackground(Color.MAGENTA);
isi.setForeground(Color.BLACK);
isi.setText("Kripton adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Kr dan nomor atom 36."); }
else if (ae.getSource() == p18e) {
isi.setBackground(Color.MAGENTA);
isi.setForeground(Color.BLACK);
isi.setText("Xenon adalah unsur dgn lambang kimia Xe,no atom 54");
}
else if (ae.getSource() == p18f) {
isi.setBackground(Color.MAGENTA);
isi.setForeground(Color.BLACK);
isi.setText("Radon adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Rn dan nomor atom 86."); }
else if (ae.getSource() == p18g) {
isi.setBackground(Color.MAGENTA);
isi.setForeground(Color.BLACK);
isi.setText("Oganeson adalah unsur kimia sintetis dengan
simbol\nOg dan nomor atom 118. "); }
else if (ae.getSource() == z1a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Lantanum adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang La dan nomor atom 57."); }
else if (ae.getSource() == z2a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Serium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Ce dan nomor atom 58."); }
else if (ae.getSource() == z3a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Praseodimium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Pr dan nomor atom 59."); }
else if (ae.getSource() == z4a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Neodimium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Nd dan nomor atom 60."); }
else if (ae.getSource() == z5a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Prometium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Pm dan nomor atom 61."); }
else if (ae.getSource() == z6a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Samarium adalah suatu unsur kimia dalam
tabel\nperiodik yang memiliki lambang Sm dan nomor atom 62."); }
else if (ae.getSource() == z7a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Europium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Eu dan nomor atom 63."); }
else if (ae.getSource() == z8a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Gadolinium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Gd dan nomor atom 64."); }
else if (ae.getSource() == z9a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Terbium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Tb dan nomor atom 65."); }
else if (ae.getSource() == z10a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Disprosium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Dy dan nomor atom 66."); }
else if (ae.getSource() == z11a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Holmium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Ho dan nomor atom 67."); }
else if (ae.getSource() == z12a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Erbium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Er dan nomor atom 68."); }
else if (ae.getSource() == z13a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Tulium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Tm dan nomor atom 69."); }
else if (ae.getSource() == z14a) {
isi.setBackground(Color.LIGHT_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Iterbium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Yb dan nomor atom 70."); }
else if (ae.getSource() == z1b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Aktinium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Ac dan nomor atom 89"); }
else if (ae.getSource() == z2b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Torium adalah suatu unsur kimia dalam tabel\nperiodik
yg memiliki lambang Th dan nomor atom 90."); }
else if (ae.getSource() == z3b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Protaktinium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Pa dan nomor atom 91"); }
else if (ae.getSource() == z4b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Uranium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang U dan nomor atom 92"); }
else if (ae.getSource() == z5b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Neptunium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Np dan nomor atom 93."); }
else if (ae.getSource() == z6b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Plutonium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Pu dan nomor atom 94."); }
else if (ae.getSource() == z7b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Amerisium adalah unsur kimia sintetik dalam
sistem\nperiodik unsur yang memiliki lambang Am dan nomor\natom 95."); }
else if (ae.getSource() == z8b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Kurium adalah unsur kimia sintetik dalam
sistem\nperiodik unsur yg memiliki lambang Cm dan nomor atom 96."); }
else if (ae.getSource() == z9b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Berkelium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Bk dan nomor atom 97."); }
else if (ae.getSource() == z10b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Kalifornium adalah unsur kimia dalam sistem\nperiodik
unsur yg memiliki lambang Cf dan nomor atom\n98."); }
else if (ae.getSource() == z11b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Einsteinium adalah suatu unsur kimia dalam
tabel\nperiodik yg memiliki lambang Es dan nomor atom 99."); }
else if (ae.getSource() == z12b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Fermium adalah unsur kimia dalam sistem\nperiodik
unsur yg memiliki lambang Fm dan nomor atom 100."); }
else if (ae.getSource() == z13b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Mendelevium adalah elemen sintetik dengan lambang\nMd
dan nomor atom 101."); }
else if (ae.getSource() == z14b) {
isi.setBackground(Color.DARK_GRAY);
isi.setForeground(Color.BLACK);
isi.setText("Nobelium adalah elemen sintentik dengan lambang\nNo
dan nomor atom 102"); }
}

public static void main(String[] args) {


TabelPeriodikCia cia= new TabelPeriodikCia ();
cia.setTitle("TABEL PERIODIK BUATAN CIA");
cia.setSize(1300, 580);
cia.setVisible(true);
cia.setDefaultCloseOperation(3);
cia.setLocationRelativeTo(null);
}
}
 Output

Anda mungkin juga menyukai