Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 1 of 3 123 LastLast
Results 1 to 25 of 61

Thread: Scroll down in JOptionPane and window problems.

  1. #1
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Question Scroll down in JOptionPane and window problems.

    One, I have it so a button in Window one will open window two. I want, if a certain condition is met in window 2 to use the doClick() method on a button in window one. However, it doesn't work out, and can't find it.

    Also, is there a way to add a scroll-down bar to a JOptionPane in case the stuff being printed out is too big to fit on the screen at once?



  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    to use the doClick() method on a button
    To call a method in a class, you need a reference to the object. Can you pass a reference to the button object to the 2nd window?

    See the JScrollPane class for how to handle too big to fit problem.

  3. The Following User Says Thank You to Norm For This Useful Post:

    javapenguin (June 13th, 2010)

  4. #3
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    I did so, but I can't seem to find it, even though I set it visible.

  5. #4
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    The reason is that it's being set in a handler. I'm actually designing a Bible and the text is too big so I need JScrollPane. However, I have it like this:

    JScrollPane scroll;

    constructor
    {

    handler()
    {
    JScrollPane = new JScrollPane();
    }

    }

    I'm not even getting a blank one from doing that. What is wrong with it?

  6. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Do a search for JScrollPane to get some examples on how to use it.
    Or go the the Java Tutorial for some examples.

  7. The Following User Says Thank You to Norm For This Useful Post:

    javapenguin (June 14th, 2010)

  8. #6
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    I found a page that explains how to use Constructors and what methods it has.



    But still, it's not working. It compiles, but it's invisible, even though I has setVisibile() to true.

  9. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    You'll have to post the code. There are so many ways to do it incorrectly, I don't know which one you've chosen.

  10. The Following User Says Thank You to Norm For This Useful Post:

    javapenguin (June 14th, 2010)

  11. #8
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

     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);
          }
       }

  12. #9
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    have you read the API doc for JScrollPane? There is a link to the Java Tutorials on that page:
    How to Use Scroll Panes (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
    Go there and study some.

  13. The Following User Says Thank You to Norm For This Useful Post:

    javapenguin (June 14th, 2010)

  14. #10
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Ok, so I need a viewpoint?

    Is that why it's not visible?

    But Component won't let me initialize it. It's being very rude.

  15. #11
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Ok, now it works, but is there a way to get it to stand alone? i.e. not have it attached to my any of my other windows and taking up their space? Also, my arrows work, but I can't see them. How do I fix that?

  16. #12
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Put it in its own window.

  17. The Following User Says Thank You to Norm For This Useful Post:

    javapenguin (June 14th, 2010)

  18. #13
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    On second thought, putting it in a separate window would be very annoying. I'd have to have a window for every chapter.

    That's at least 500 windows.

    I just would like to know how to make my scroll bars visible. I can shrink it so it isn't a problem or I can add a scroll bar to my other window. That way, if it won't fit in the one with 150 chapters, i can scroll the main window down.

    How do I add JScrollBar to here?

  19. #14
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Do you get a scroll bar with a scroll pane?
    Or do you want one separate from the pane?

  20. The Following User Says Thank You to Norm For This Useful Post:

    javapenguin (June 14th, 2010)

  21. #15
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    I'd prefer to have just one new window that would update accordingly as the text size changed, so I wouldn't have to make hundreds more windows. I'm already going to have to make 66 windows, plus a main window.

    Also, I'd like the window to come up before my popup message asking if they want to go to next or previous chapters.

    What does updateUI() do? Would that help solve any of the problems of using just one window?

    Is it possible to make a JFrame with scroll bars? If so, then perhaps I could make it down to just one window, and have the text, which'll update as the chapter change, in a second window, which also will scroll down.

  22. #16
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    What does updateUI() do
    What class is it in? Have you read the API doc for that class and method?

    make a JFrame with scroll bars
    Not easily. Why not use the JScrollPane?

  23. The Following User Says Thank You to Norm For This Useful Post:

    javapenguin (June 14th, 2010)

  24. #17
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    I need it to update the thing so the text will change in the JTextArea. But I don't want any of the old text left over.

    Can you add buttons to a JScrollPane?

    Otherwise, my annoying popups that I set to ask user if they want to go to previous chapter or next chapter won't let the user even read the text in the scroll pane until they deal with it first.

  25. #18
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Also, how to do you get the stuff into an actual application? i.e. make the code work in something that doesn't need to have JGrasp or one of those programs running for it to function?

  26. #19
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    until they deal with it first
    A feature of modal.
    Can you add buttons to a JScrollPane
    JScrollPane extends the Container class which has the add() methods.
    Do you have such large buttons that you need a scroll bar to see them?
    make the code work
    the java command is how you make code work

    Eventually you could learn some java, but this jumping around is leaving lots of holes where you should have knowledge.
    Go back to chapter one and start over.

  27. #20
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    I mean, can I run the programs that I made that do compile and do run nicely as separate appkications, or is that illegal or not possible, etc?

  28. #21
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    can I run the programs that I made
    Yes, most people do run their programs after they compile them.

    do run nicely as separate applications
    ??? separate from what?

  29. #22
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Quote Originally Posted by Norm View Post
    Yes, most people do run their programs after they compile them.


    ??? separate from what?
    From the compiler? From JGrasp.

    Can I make that Battleship program, which now works perfectly, well, it does something weird, but all code is fine, it just changed color when I move cursor over it. It's probably a silly windows glitch or something. It's not serious and will change back and appears to not be related to the code, as I don't have any MouseListeners.

    Like how did they get the code for this website to be online and not just only be able to run in JGrasp?

  30. #23
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Another example would be, I designed code for ring toss game. I want to make it into ring toss program that doesn't have to have JGrasp to run it.

    See what I'm saying now?

  31. #24
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    get the code for this website to be online
    Make it an applet and put its class files and an html file on a server.

    To run a java program use the java.exe command.

  32. #25
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Quote Originally Posted by Norm View Post
    Make it an applet and put its class files and an html file on a server.

    To run a java program use the java.exe command.
    No, no, no. Not exactly what I meant. How do you get it as a separate application from JGrasp? Something that'll run without even having to turn JGrasp on? A separate file. A separate program. Software.

    How do you get the stuff, once the code works, into a program others can use without having to use JGrasp themselves in order to run it?


Page 1 of 3 123 LastLast

Similar Threads

  1. Using Icons in JOptionPane
    By Jchang504 in forum AWT / Java Swing
    Replies: 3
    Last Post: September 19th, 2014, 02:28 PM
  2. Return result from JOptionPane to JFrame
    By cselic in forum AWT / Java Swing
    Replies: 7
    Last Post: May 13th, 2010, 01:17 PM
  3. How do i show all the values in one window(JOptionPane)??
    By Antonioj1015 in forum AWT / Java Swing
    Replies: 1
    Last Post: November 25th, 2009, 09:24 PM
  4. JOptionPane Question/ Printing
    By 03EVOAWD in forum AWT / Java Swing
    Replies: 2
    Last Post: August 31st, 2009, 09:17 AM
  5. Replies: 1
    Last Post: May 21st, 2009, 03:41 AM