import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.io.*;
import java.awt.event.WindowEvent;
import java.awt.Window;
import javax.swing.JScrollPane;
import java.awt.Component;
public class OpenANewWindow {
public static void main(String[] args) {
BibleWindow frame = new BibleWindow();
frame.showGUI();
}
}
class BibleWindow extends JFrame {
JButton Genesis, Exodus, Leviticus, Numbers, Deuteronomy, Joshua, Judges, Ruth, ISamual, IISamual, IKings, IIKings, IChronicles, IIChronicles,
Ezra, Nehemiah, Esther, Job, Psalms, Proverbs, Ecclesiastes, SongOfSolomon, Isaiah, Jeremiah, Lamentations, Ezekiel, Daniel, Hosea, Joel, Amos,
Obadiah, Jonah, Micah, Nahum, Habakkuk, Zephaniah, Haggai, Zechariah, Malachi, Matthew, Mark, Luke, John, Acts, Romans, ICorinthians, IICorinthians,
Galatians, Ephesians, Philippians, Colossians, IThessalonians, IIThessalonians, ITimothy, IITimothy, Titus, Philemon, Hebrews, James, IPeter, IIPeter,
IJohn, IIJohn, IIIJohn, Jude, Revelation;
JPanel panel;
GenWindow genWindow = new GenWindow();
ExoWindow exoWindow = new ExoWindow();
public BibleWindow() {
panel = new JPanel();
setTitle("Bible");
Genesis = new JButton("Genesis");
Exodus = new JButton("Exodus");
Leviticus = new JButton("Leviticus");
Numbers = new JButton("Numbers");
Deuteronomy = new JButton("Deuteronomy");
Joshua = new JButton("Joshua");
Judges = new JButton("Judges");
Ruth = new JButton("Ruth");
ISamual = new JButton("First Samual");
IISamual = new JButton("Second Samual");
IKings = new JButton("First Kings");
IIKings = new JButton("Second Kings");
IChronicles = new JButton("First Chronicles");
IIChronicles = new JButton("Second Chronicles");
Ezra = new JButton("Ezra");
Nehemiah = new JButton("Nehemiah");
Esther = new JButton("Esther");
Job = new JButton("Job");
Psalms = new JButton("Psalms");
Proverbs = new JButton("Proverbs");
Ecclesiastes = new JButton("Ecclesiastes");
SongOfSolomon = new JButton("Song of Solomon");
Isaiah = new JButton("Isaiah");
Jeremiah = new JButton("Jeremiah");
Lamentations = new JButton("Lamentations");
Ezekiel = new JButton("Ezekiel");
Daniel = new JButton("Daniel");
Hosea = new JButton("Hosea");
Joel = new JButton("Joel");
Amos = new JButton("Amos");
Obadiah = new JButton("Obadiah");
Jonah = new JButton("Jonah");
Micah = new JButton("Micah");
Nahum = new JButton("Nahum");
Habakkuk = new JButton("Habakkuk");
Zephaniah = new JButton("Zephaniah");
Haggai = new JButton("Haggai");
Zechariah = new JButton("Zechariah");
Malachi = new JButton("Malachi");
Matthew = new JButton("Matthew");
Mark = new JButton("Mark");
Luke = new JButton("Luke");
John = new JButton("John");
Acts = new JButton("Acts");
Romans = new JButton("Romans");
ICorinthians = new JButton("First Corinthians");
IICorinthians = new JButton("Second Corinthians");
Galatians = new JButton("Galatians");
Ephesians = new JButton("Ephesians");
Philippians = new JButton("Philippians");
Colossians = new JButton("Colossians");
IThessalonians = new JButton("First Thessalonians");
IIThessalonians = new JButton("Second Thessalonians");
ITimothy = new JButton("First Timothy");
IITimothy = new JButton("Second Timothy");
Titus = new JButton("Titus");
Philemon = new JButton("Philemon");
Hebrews = new JButton("Hebrews");
James = new JButton("James");
IPeter = new JButton("First Peter");
IIPeter = new JButton("Second Peter");
IJohn = new JButton("First John");
IIJohn = new JButton("Second John");
IIIJohn = new JButton("Third John");
Jude = new JButton("Jude");
Revelation = new JButton("Revelation");
Genesis.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
genWindow.setVisible(true);
}
});
Exodus.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
exoWindow.setVisible(true);
}
});
panel.add(Genesis);
panel.add(Exodus);
panel.add(Leviticus);
panel.add(Numbers);
panel.add(Deuteronomy);
panel.add(Joshua);
panel.add(Judges);
panel.add(Ruth);
panel.add(ISamual);
panel.add(IISamual);
panel.add(IKings);
panel.add(IIKings);
panel.add(IChronicles);
panel.add(IIChronicles);
panel.add(Ezra);
panel.add(Nehemiah);
panel.add(Esther);
panel.add(Job);
panel.add(Psalms);
panel.add(Proverbs);
panel.add(Ecclesiastes);
panel.add(SongOfSolomon);
panel.add(Isaiah);
panel.add(Jeremiah);
panel.add(Lamentations);
panel.add(Ezekiel);
panel.add(Daniel);
panel.add(Hosea);
panel.add(Joel);
panel.add(Amos);
panel.add(Obadiah);
panel.add(Jonah);
panel.add(Micah);
panel.add(Nahum);
panel.add(Habakkuk);
panel.add(Zephaniah);
panel.add(Haggai);
panel.add(Zechariah);
panel.add(Malachi);
panel.add(Matthew);
panel.add(Mark);
panel.add(Luke);
panel.add(John);
panel.add(Acts);
panel.add(Romans);
panel.add(ICorinthians);
panel.add(IICorinthians);
panel.add(Galatians);
panel.add(Ephesians);
panel.add(Philippians);
panel.add(Colossians);
panel.add(IThessalonians);
panel.add(IIThessalonians);
panel.add(ITimothy);
panel.add(IITimothy);
panel.add(Titus);
panel.add(Philemon);
panel.add(Hebrews);
panel.add(James);
panel.add(IPeter);
panel.add(IIPeter);
panel.add(IJohn);
panel.add(IIJohn);
panel.add(IIIJohn);
panel.add(Jude);
panel.add(Revelation);
getContentPane().add(panel);
}
public void showGUI() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(300,300);
setLocation(100,100);
setVisible(true);
}
}
class GenWindow extends JFrame {
JButton chap1, chap2, chap3, chap4, chap5, chap6, chap7, chap8, chap9, chap10, chap11, chap12, chap13, chap14, chap15, chap16, chap17, chap18,
chap19, chap20, chap21, chap22, chap23, chap24, chap25, chap26, chap27, chap28, chap29, chap30, chap31, chap32, chap33, chap34, chap35,
chap36, chap37, chap38, chap39, chap40, chap41, chap42, chap43, chap44, chap45, chap46, chap47, chap48, chap49, chap50;
JFrame frameG;
JScrollPane scroll;
JPanel panel2;
public GenWindow() {
setTitle("Genesis");
panel2 = new JPanel();
chap1 = new JButton("Chapter One");
chap2 = new JButton("Chapter Two");
chap3 = new JButton("Chapter Three");
chap4 = new JButton("Chapter Four");
chap5 = new JButton("Chapter Five");
chap6 = new JButton("Chapter Six");
chap7 = new JButton("Chapter Seven");
chap8 = new JButton("Chapter Eight");
chap9 = new JButton("Chapter Nine");
chap10 = new JButton("Chapter Ten");
chap11 = new JButton("Chapter Eleven");
chap12 = new JButton("Chapter Twelve");
chap13 = new JButton ("Chapter Thirteen");
chap14 = new JButton("Chapter Fourteen");
chap15 = new JButton("Chapter Fifteen");
chap16 = new JButton("Chapter Sixteen");
chap17 = new JButton ("Chapter Seventeen");
chap18 = new JButton ("Chapter Eighteen");
chap19 = new JButton ("Chapter Nineteen");
chap20 = new JButton("Chapter Twenty");
chap21 = new JButton("Chapter Twenty-one");
chap22 = new JButton("Chapter Twenty-two");
chap23 = new JButton("Chapter Twenty-three");
chap24 = new JButton("Chapter Twenty-four");
chap25 = new JButton("Chapter Twenty-five");
chap26 = new JButton("Chapter Twenty-six");
chap27 = new JButton("Chapter Twenty-seven");
chap28 = new JButton("Chapter Twenty-eight");
chap29 = new JButton("Chapter Twenty-nine");
chap30 = new JButton("Chapter Thirty");
chap31 = new JButton("Chapter Thirty-one");
chap32 = new JButton("Chapter Thirty-two");
chap33 = new JButton("Chapter Thirty-three");
chap34 = new JButton("Chapter Thirty-four");
chap35 = new JButton("Chapter Thirty-five");
chap36 = new JButton("Chapter Thirty-six");
chap37 = new JButton("Chapter Thirty-seven");
chap38 = new JButton("Chapter Thirty-eight");
chap39 = new JButton("Chapter Thirty-nine");
chap40 = new JButton("Chapter Forty");
chap41 = new JButton("Chapter Forty-one");
chap42 = new JButton("Chapter Forty-two");
chap43 = new JButton("Chapter Forty-three");
chap44 = new JButton("Chapter Forty-four");
chap45 = new JButton("Chapter Forty-five");
chap46 = new JButton("Chapter Forty-six");
chap47 = new JButton("Chapter Forty-seven");
chap48 = new JButton("Chapter Forty-eight");
chap49 = new JButton("Chapter Forty-nine");
chap50 = new JButton("Chapter Fifty");
chap1.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
String genChap1 = "Genesis Chapter One" + "\n" +
"1 ¶ In the beginning God created the heaven and the earth. " + "\n" +
"2 And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters." + "\n" +
"3 ¶ And God said, Let there be light: and there was light." + "\n" +
"4 And God saw the light, that it was good: and God divided the light from the darkness." + "\n" +
"5 And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day." + "\n" +
"6 ¶ And God said, Let there be a firmament in the midst of the waters, and let it divide the waters from the waters. " + "\n" +
"7 And God made the firmament, and divided the waters which were under the firmament from the waters which were above the firmament: and it was so." + "\n" +
"8 And God called the firmament Heaven. And the evening and the morning were the second day." + "\n" +
"9 ¶ And God said, Let the waters under the heaven be gathered together unto one place, and let the dry land appear: and it was so." + "\n" +
"10 And God called the dry land Earth; and the gathering together of the waters called he Seas: and God saw that it was good." + "\n" +
"11 And God said, Let the earth bring forth grass, the herb yielding seed, and the fruit tree yielding fruit after his kind, whose seed is in itself, upon the earth: and it was so." + "\n" +
"12 And the earth brought forth grass, and herb yielding seed after his kind, and the tree yielding fruit, whose seed was in itself, after his kind: and God saw that it was good." + "\n" +
"13 And the evening and the morning were the third day." + "\n" +
"14 ¶ And God said, Let there be lights in the firmament of the heaven to divide the day from the night; and let them be for signs, and for seasons, and for days, and years:" + "\n" +
"15 And let them be for lights in the firmament of the heaven to give light upon the earth: and it was so." + "\n" +
"16 And God made two great lights; the greater light to rule the day, and the lesser light to rule the night: he made the stars also." + "\n" +
"17 And God set them in the firmament of the heaven to give light upon the earth," + "\n" +
"18 And to rule over the day and over the night, and to divide the light from the darkness: and God saw that it was good." + "\n" +
"19 And the evening and the morning were the fourth day." + "\n" +
"20 ¶ And God said, Let the waters bring forth abundantly the moving creature that hath life, and fowl that may fly above the earth in the open firmament of heaven." + "\n" +
"21 And God created great whales, and every living creature that moveth, which the waters brought forth abundantly, after their kind, and every winged fowl after his kind: and God saw that it was good." + "\n" +
"22 And God blessed them, saying, Be fruitful, and multiply, and fill the waters in the seas, and let fowl multiply in the earth." + "\n" +
"23 And the evening and the morning were the fifth day." + "\n" +
"24 ¶ And God said, Let the earth bring forth the living creature after his kind, cattle, and creeping thing, and beast of the earth after his kind: and it was so." + "\n" +
"25 And God made the beast of the earth after his kind, and cattle after their kind, and every thing that creepeth upon the earth after his kind: and God saw that it was good." + "\n" +
"26 ¶ And God said, Let us make man in our image, after our likeness: and let them have dominion over the fish of the sea, and over the fowl of the air, and over the cattle, and over all the earth, and over every creeping thing that creepeth upon the earth." + "\n" +
"27 So God created man in his own image, in the image of God created he him; male and female created he them." + "\n" +
"28 And God blessed them, and God said unto them, Be fruitful, and multiply, and replenish the earth, and subdue it: and have dominion over the fish of the sea, and over the fowl of the air, and over every living thing that moveth upon the earth." + "\n" +
"29 ¶ And God said, Behold, I have given you every herb bearing seed, which is upon the face of all the earth, and every tree, in the which is the fruit of a tree yielding seed; to you it shall be for meat." + "\n" +
"30 And to every beast of the earth, and to every fowl of the air, and to every thing that creepeth upon the earth, wherein there is life, I have given every green herb for meat: and it was so." + "\n" +
"31 ¶ And God saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day. " ;
System.out.println(genChap1);
scroll = new JScrollPane();
panel2.add(scroll);
scroll.setName(genChap1);
scroll.setVisible(true);
Object[] Genesis1 = {"Next Chapter",
"Ok"};
int a = JOptionPane.showOptionDialog(frameG,
"What do you want to do now?",
"Hit Next Chapter to go to next chapter",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, Genesis1, Genesis1[0]);
if (a == JOptionPane.YES_OPTION)
{ // beginning of if
// clicks on Chapter Two button and opens chapter 2, I hope
System.out.println();
chap2.doClick();
} // end of if
else if (a== JOptionPane.NO_OPTION)
{
// does nothing
}
}
});
chap2.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
String genChap2 = "Genesis Chapter Two" + "\n" +
"1 ¶ Thus the heavens and the earth were finished, and all the host of them." + "\n" +
"2 And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made." + "\n" +
"3 And God blessed the seventh day, and sanctified it: because that in it he had rested from all his work which God created and made." + "\n" +
"4 ¶ These are the generations of the heavens and of the earth when they were created, in the day that the LORD God made the earth and the heavens," + "\n" +
"5 And every plant of the field before it was in the earth, and every herb of the field before it grew: for the LORD God had not caused it to rain upon the earth, and there was not a man to till the ground." + "\n" +
"6 But there went up a mist from the earth, and watered the whole face of the ground." + "\n" +
"7 And the LORD God formed man of the dust of the ground, and breathed into his nostrils the breath of life; and man became a living soul." + "\n" +
"8 ¶ And the LORD God planted a garden eastward in Eden; and there he put the man whom he had formed." + "\n" +
"9 And out of the ground made the LORD God to grow every tree that is pleasant to the sight, and good for food; the tree of life also in the midst of the garden, and the tree of knowledge of good and evil." + "\n" +
"10 And a river went out of Eden to water the garden; and from thence it was parted, and became into four heads." + "\n" +
"11 The name of the first is Pison: that is it which compasseth the whole land of Havilah, where there is gold;" + "\n" +
"12 And the gold of that land is good: there is bdellium and the onyx stone." + "\n" +
"13 And the name of the second river is Gihon: the same is it that compasseth the whole land of Ethiopia." + "\n" +
"14 And the name of the third river is Hiddekel: that is it which goeth toward the east of Assyria. And the fourth river is Euphrates." + "\n" +
"15 And the LORD God took the man, and put him into the garden of Eden to dress it and to keep it." + "\n" +
"16 ¶ And the LORD God commanded the man, saying, Of every tree of the garden thou mayest freely eat:" + "\n" +
"17 But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die." + "\n" +
"18 ¶ And the LORD God said, It is not good that the man should be alone; I will make him an help meet for him." + "\n" +
"19 And out of the ground the LORD God formed every beast of the field, and every fowl of the air; and brought them unto Adam to see what he would call them: and whatsoever Adam called every living creature, that was the name thereof." + "\n" +
"20 And Adam gave names to all cattle, and to the fowl of the air, and to every beast of the field; but for Adam there was not found an help meet for him." + "\n" +
"21 ¶ And the LORD God caused a deep sleep to fall upon Adam, and he slept: and he took one of his ribs, and closed up the flesh instead thereof;" + "\n" +
"22 And the rib, which the LORD God had taken from man, made he a woman, and brought her unto the man." + "\n" +
"23 And Adam said, This is now bone of my bones, and flesh of my flesh: she shall be called Woman, because she was taken out of Man." + "\n" +
"24 Therefore shall a man leave his father and his mother, and shall cleave unto his wife: and they shall be one flesh." + "\n" +
"25 And they were both naked, the man and his wife, and were not ashamed. ";
System.out.println(genChap2);
Object[] Genesis2 = {"Next Chapter",
"Previous Chapter", "Ok"};
int b = JOptionPane.showOptionDialog(frameG,
"What do you want to do now?",
"Hit Next Chapter to go to next chapter or hit Previous Chapter to go to previous chapter",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, Genesis2, Genesis2[0]);
if (b == JOptionPane.YES_OPTION)
{ // beginning of if
// clicks on Chapter Three button and opens chapter 2 and adds a space to separate them.
System.out.println();
chap3.doClick();
} // end of if
else if (b == JOptionPane.NO_OPTION)
{
// clicks on Chapter One button and opens Chapter One and adds a space to separate them.
System.out.println();
chap1.doClick(); }
else if ( b == JOptionPane.CANCEL_OPTION)
{
// does nothing
}
}
});
chap3.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
String genChap3 = "Genesis Chapter Three" + "\n" +
" 1 ¶ Now the serpent was more subtil than any beast of the field which the LORD God had made. And he said unto the woman, Yea, hath God said, Ye shall not eat of every tree of the garden?" + "\n" +
"2 And the woman said unto the serpent, We may eat of the fruit of the trees of the garden:" + "\n" +
"3 But of the fruit of the tree which is in the midst of the garden, God hath said, Ye shall not eat of it, neither shall ye touch it, lest ye die." + "\n" +
"4 And the serpent said unto the woman, Ye shall not surely die:" + "\n" +
"5 For God doth know that in the day ye eat thereof, then your eyes shall be opened, and ye shall be as gods, knowing good and evil." + "\n" +
"6 ¶ And when the woman saw that the tree was good for food, and that it was pleasant to the eyes, and a tree to be desired to make one wise, she took of the fruit thereof, and did eat, and gave also unto her husband with her; and he did eat." + "\n" +
"7 And the eyes of them both were opened, and they knew that they were naked; and they sewed fig leaves together, and made themselves aprons." + "\n" +
"8 And they heard the voice of the LORD God walking in the garden in the cool of the day: and Adam and his wife hid themselves from the presence of the LORD God amongst the trees of the garden." + "\n" +
"9 ¶ And the LORD God called unto Adam, and said unto him, Where art thou?" + "\n" +
"10 And he said, I heard thy voice in the garden, and I was afraid, because I was naked; and I hid myself." + "\n" +
"11 ¶ And he said, Who told thee that thou wast naked? Hast thou eaten of the tree, whereof I commanded thee that thou shouldest not eat?" + "\n" +
"12 And the man said, The woman whom thou gavest to be with me, she gave me of the tree, and I did eat." + "\n" +
"13 And the LORD God said unto the woman, What is this that thou hast done? And the woman said, The serpent beguiled me, and I did eat." + "\n" +
"14 ¶ And the LORD God said unto the serpent, Because thou hast done this, thou art cursed above all cattle, and above every beast of the field; upon thy belly shalt thou go, and dust shalt thou eat all the days of thy life:" + "\n" +
"15 And I will put enmity between thee and the woman, and between thy seed and her seed; it shall bruise thy head, and thou shalt bruise his heel." + "\n" +
"16 ¶ Unto the woman he said, I will greatly multiply thy sorrow and thy conception; in sorrow thou shalt bring forth children; and thy desire shall be to thy husband, and he shall rule over thee."+ "\n" +
"17 ¶ And unto Adam he said, Because thou hast hearkened unto the voice of thy wife, and hast eaten of the tree, of which I commanded thee, saying, Thou shalt not eat of it: cursed is the ground for thy sake; in sorrow shalt thou eat of it all the days of thy life;" + "\n" +
"18 Thorns also and thistles shall it bring forth to thee; and thou shalt eat the herb of the field;" + "\n" +
"19 In the sweat of thy face shalt thou eat bread, till thou return unto the ground; for out of it wast thou taken: for dust thou art, and unto dust shalt thou return." + "\n" +
"20 ¶ And Adam called his wife's name Eve; because she was the mother of all living." + "\n" +
"21 ¶ Unto Adam also and to his wife did the LORD God make coats of skins, and clothed them." + "\n" +
"22 ¶ And the LORD God said, Behold, the man is become as one of us, to know good and evil: and now, lest he put forth his hand, and take also of the tree of life, and eat, and live for ever:" + "\n" +
"23 Therefore the LORD God sent him forth from the garden of Eden, to till the ground from whence he was taken." + "\n" +
"24 So he drove out the man; and he placed at the east of the garden of Eden Cherubims, and a flaming sword which turned every way, to keep the way of the tree of life.";
System.out.println(genChap3);
Object[] Genesis3 = {"Next Chapter",
"Previous Chapter", "Ok"};
int c = JOptionPane.showOptionDialog(frameG,
"What do you want to do now?",
"Hit Next Chapter to go to next chapter or hit Previous Chapter to go to previous chapter",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, Genesis3, Genesis3[0]);
if (c == JOptionPane.YES_OPTION)
{ // beginning of if
// clicks on Chapter Four button and opens chapter 4 and adds a space to separate them.
System.out.println();
chap4.doClick();
} // end of if
else if (c == JOptionPane.NO_OPTION)
{
// clicks on Chapter Two button and opens Chapter Two and adds a space to separate them.
System.out.println();
chap2.doClick(); }
else if ( c == JOptionPane.CANCEL_OPTION)
{
// does nothing
}
}
});
chap4.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
String genChap4 = "Genesis Chapter Four" + "\n" +
"1 ¶ And Adam knew Eve his wife; and she conceived, and bare Cain, and said, I have gotten a man from the LORD." + "\n" +
"2 And she again bare his brother Abel. And Abel was a keeper of sheep, but Cain was a tiller of the ground." + "\n" +
"3 ¶ And in process of time it came to pass, that Cain brought of the fruit of the ground an offering unto the LORD." + "\n" +
"4 And Abel, he also brought of the firstlings of his flock and of the fat thereof. And the LORD had respect unto Abel and to his offering:" + "\n" +
"5 But unto Cain and to his offering he had not respect. And Cain was very wroth, and his countenance fell." + "\n" +
"6 ¶ And the LORD said unto Cain, Why art thou wroth? and why is thy countenance fallen?" + "\n" +
"7 If thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him." + "\n" +
"8 ¶ And Cain talked with Abel his brother: and it came to pass, when they were in the field, that Cain rose up against Abel his brother, and slew him." + "\n" +
"9 ¶ And the LORD said unto Cain, Where is Abel thy brother? And he said, I know not: Am I my brother's keeper?" + "\n" +
"10 And he said, What hast thou done? the voice of thy brother's blood crieth unto me from the ground." + "\n" +
"11 And now art thou cursed from the earth, which hath opened her mouth to receive thy brother's blood from thy hand;" + "\n" +
"12 When thou tillest the ground, it shall not henceforth yield unto thee her strength; a fugitive and a vagabond shalt thou be in the earth." + "\n" +
"13 ¶ And Cain said unto the LORD, My punishment is greater than I can bear." + "\n" +
"14 Behold, thou hast driven me out this day from the face of the earth; and from thy face shall I be hid; and I shall be a fugitive and a vagabond in the earth; and it shall come to pass, that every one that findeth me shall slay me." + "\n" +
"15 And the LORD said unto him, Therefore whosoever slayeth Cain, vengeance shall be taken on him sevenfold. And the LORD set a mark upon Cain, lest any finding him should kill him." + "\n" +
"16 ¶ And Cain went out from the presence of the LORD, and dwelt in the land of Nod, on the east of Eden." + "\n" +
"17 And Cain knew his wife; and she conceived, and bare Enoch: and he builded a city, and called the name of the city, after the name of his son, Enoch." + "\n" +
"18 And unto Enoch was born Irad: and Irad begat Mehujael: and Mehujael begat Methusael: and Methusael begat Lamech." + "\n" +
"19 ¶ And Lamech took unto him two wives: the name of the one was Adah, and the name of the other Zillah." + "\n" +
"20 And Adah bare Jabal: he was the father of such as dwell in tents, and of such as have cattle." + "\n" +
"21 And his brother's name was Jubal: he was the father of all such as handle the harp and organ." + "\n" +
"22 And Zillah, she also bare Tubalcain, an instructer of every artificer in brass and iron: and the sister of Tubalcain was Naamah." + "\n" +
"23 ¶ And Lamech said unto his wives, Adah and Zillah, Hear my voice; ye wives of Lamech, hearken unto my speech: for I have slain a man to my wounding, and a young man to my hurt." + "\n" +
"24 If Cain shall be avenged sevenfold, truly Lamech seventy and sevenfold." + "\n" +
"25 ¶ And Adam knew his wife again; and she bare a son, and called his name Seth: For God, said she, hath appointed me another seed instead of Abel, whom Cain slew." + "\n" +
"26 And to Seth, to him also there was born a son; and he called his name Enos: then began men to call upon the name of the LORD. ";
System.out.println(genChap4);
Object[] Genesis4 = {"Next Chapter",
"Previous Chapter", "Ok"};
int d = JOptionPane.showOptionDialog(frameG,
"What do you want to do now?",
"Hit Next Chapter to go to next chapter or hit Previous Chapter to go to previous chapter",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, Genesis4, Genesis4[0]);
if (d == JOptionPane.YES_OPTION)
{ // beginning of if
// clicks on Chapter Four button and opens chapter 4 and adds a space to separate them.
System.out.println();
chap5.doClick();
} // end of if
else if (d == JOptionPane.NO_OPTION)
{
// clicks on Chapter Two button and opens Chapter Two and adds a space to separate them.
System.out.println();
chap3.doClick(); }
else if ( d == JOptionPane.CANCEL_OPTION)
{
// does nothing
}
}
});
panel2.add(chap1);
panel2.add(chap2);
panel2.add(chap3);
panel2.add(chap4);
panel2.add(chap5);
panel2.add(chap6);
panel2.add(chap7);
panel2.add(chap8);
panel2.add(chap9);
panel2.add(chap10);
panel2.add(chap11);
panel2.add(chap12);
panel2.add(chap13);
panel2.add(chap14);
panel2.add(chap15);
panel2.add(chap16);
panel2.add(chap17);
panel2.add(chap18);
panel2.add(chap19);
panel2.add(chap20);
panel2.add(chap21);
panel2.add(chap22);
panel2.add(chap23);
panel2.add(chap24);
panel2.add(chap25);
panel2.add(chap26);
panel2.add(chap27);
panel2.add(chap28);
panel2.add(chap29);
panel2.add(chap30);
panel2.add(chap31);
panel2.add(chap32);
panel2.add(chap33);
panel2.add(chap34);
panel2.add(chap35);
panel2.add(chap36);
panel2.add(chap37);
panel2.add(chap38);
panel2.add(chap39);
panel2.add(chap40);
panel2.add(chap41);
panel2.add(chap42);
panel2.add(chap43);
panel2.add(chap44);
panel2.add(chap45);
panel2.add(chap46);
panel2.add(chap47);
panel2.add(chap48);
panel2.add(chap49);
panel2.add(chap50);
getContentPane().add(panel2);
}
public void showGUI2(){
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(200,200);
setLocation(300,300);
setVisible(true);
}
}
class ExoWindow extends JFrame
{
JButton exChap1, exChap2, exChap3, exChap4, exChap5, exChap6, exChap7, exChap8, exChap9, exChap10, exChap11, exChap12, exChap13, exChap14,
exChap15, exChap16, exChap17, exChap18, exChap19, exChap20, exChap21, exChap22, exChap23, exChap24, exChap25, exChap26, exChap27,
exChap28, exChap29, exChap30, exChap31, exChap32, exChap33, exChap34, exChap35, exChap36, exChap37, exChap38, exChap39, exChap40;
JPanel panel3;
JFrame frameEx;
public ExoWindow()
{
setTitle("Exodus");
panel3 = new JPanel();
exChap1 = new JButton("Chapter One");
exChap2 = new JButton ("Chapter Two");
exChap3 = new JButton("Chapter Three");
exChap4 = new JButton("Chapter Four");
exChap5 = new JButton("Chapter Five");
exChap6 = new JButton("Chapter Six");
exChap7 = new JButton("Chapter Seven");
exChap8 = new JButton("Chapter Eight");
exChap9 = new JButton("Chapter Nine");
exChap10 = new JButton("Chapter Ten");
exChap11 = new JButton("Chapter Eleven");
exChap1.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
String exChap1 = "Exodus Chapter One" + "\n" +
"1 ¶ Now these are the names of the children of Israel, which came into Egypt; every man and his household came with Jacob." + "\n" +
"2 Reuben, Simeon, Levi, and Judah," + "\n" +
"3 Issachar, Zebulun, and Benjamin," + "\n" +
"4 Dan, and Naphtali, Gad, and Asher." + "\n" +
"5 And all the souls that came out of the loins of Jacob were seventy souls: for Joseph was in Egypt already." + "\n" +
"6 And Joseph died, and all his brethren, and all that generation." + "\n" +
"7 And the children of Israel were fruitful, and increased abundantly, and multiplied, and waxed exceeding mighty; and the land was filled with them." + "\n" +
"8 ¶ Now there arose up a new king over Egypt, which knew not Joseph." + "\n" +
"9 And he said unto his people, Behold, the people of the children of Israel are more and mightier than we:" + "\n" +
"10 Come on, let us deal wisely with them; lest they multiply, and it come to pass, that, when there falleth out any war, they join also unto our enemies, and fight against us, and so get them up out of the land." + "\n" +
"11 Therefore they did set over them taskmasters to afflict them with their burdens. And they built for Pharaoh treasure cities, Pithom and Raamses." + "\n" +
"12 But the more they afflicted them, the more they multiplied and grew. And they were grieved because of the children of Israel." + "\n" +
"13 And the Egyptians made the children of Israel to serve with rigour:" + "\n" +
"14 And they made their lives bitter with hard bondage, in morter, and in brick, and in all manner of service in the field: all their service, wherein they made them serve, was with rigour." + "\n" +
"15 ¶ And the king of Egypt spake to the Hebrew midwives, of which the name of the one was Shiphrah, and the name of the other Puah:" + "\n" +
"16 And he said, When ye do the office of a midwife to the Hebrew women, and see them upon the stools; if it be a son, then ye shall kill him: but if it be a daughter, then she shall live." + "\n" +
"17 But the midwives feared God, and did not as the king of Egypt commanded them, but saved the men children alive." + "\n" +
"18 And the king of Egypt called for the midwives, and said unto them, Why have ye done this thing, and have saved the men children alive?" + "\n" +
"19 And the midwives said unto Pharaoh, Because the Hebrew women are not as the Egyptian women; for they are lively, and are delivered ere the midwives come in unto them." + "\n" +
"20 Therefore God dealt well with the midwives: and the people multiplied, and waxed very mighty." + "\n" +
"21 And it came to pass, because the midwives feared God, that he made them houses." + "\n" +
"22 And Pharaoh charged all his people, saying, Every son that is born ye shall cast into the river, and every daughter ye shall save alive.";
System.out.println(exChap1);
Object[] Exodus1 = {"Next Chapter",
"Previous Chapter", "Search"};
int a = JOptionPane.showOptionDialog(frameEx,
"What do you want to do now?",
"Hit Next Chapter to go to next chapter or hit Previous Chapter to go to previous chapter",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null, Exodus1, Exodus1[0]);
if (a == JOptionPane.YES_OPTION)
{ // beginning of if
// clicks on Chapter Three button and opens chapter 2 and adds a space to separate them.
System.out.println();
exChap2.doClick();
} // end of if
else if (a == JOptionPane.NO_OPTION)
{
// clicks on Chapter One button and opens Chapter One and adds a space to separate them.
System.out.println();
GenWindow gen;
gen = new GenWindow();
gen.setVisible(true);
}
else if ( a == JOptionPane.CANCEL_OPTION)
{
String inputStr;
inputStr = JOptionPane.showInputDialog(null,"Search");
if (exChap1.contains(inputStr) == true)
System.out.println("Is in chapter");
else
System.out.println("Isn't in chapter");
}
}
});
panel3.add(exChap1);
panel3.add(exChap2);
getContentPane().add(panel3);
}
public void showGUI3(){
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(200,200);
setLocation(300,300);
setVisible(true);
}
}