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 3 of 3 FirstFirst 123
Results 51 to 61 of 61

Thread: Scroll down in JOptionPane and window problems.

  1. #51
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Yes those are examples of packages.

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

    javapenguin (June 15th, 2010)

  3. #52
    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.

    So what would I call mine? I'm importing more than one of those package types I just mentioned in the last post.

    I just called it Battleship, but it didn't like it.

    Does package name have to be the same as class name?

  4. #53
    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 entered:

    jar cfm Battleship.jar manifest.txt Battleship/*.class

    into command prompt but it didn't like it.

    said that it isn't recognized as a command, bla bla bla.

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

    Question Re: Scroll down in JOptionPane and window problems.

    HTML Code:
    We then create a JAR file named MyJar.jar by entering the following command:
    
        jar cfm MyJar.jar Manifest.txt MyPackage/*.class
    entering command where? In command prompt?

  6. #55
    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.

    jar cf bob.jar BattleshipGUI.class BattleshipGUI$1.class BattleshipGUI$QuitButtonHandler.class BattleshipGUI$SurrenderButtonHandler.class MyTooSmallException.class MyTooBigException.class

    That won't work either.

  7. #56
    Member
    Join Date
    May 2010
    Posts
    38
    Thanks
    1
    Thanked 8 Times in 7 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    Have you considered the NetBeans, Eclipse, or Intellij IDEA IDE's? They do this all for you. Knowing how to make a JAR file by hand is not a requirement for a Java developer, although it does come in handy.

    If you don't want to use an IDE, try this: Use ANT to Build a JAR with version/build number - Real's Java How-to

  8. The Following User Says Thank You to Lord.Quackstar For This Useful Post:

    javapenguin (June 15th, 2010)

  9. #57
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Scroll down in JOptionPane and window problems.

    isn't recognized as a command
    That message is from the OS. It is saying that it does not know/recognize the command you entered.
    Where is the file for the command located? Is that location on the path?
    Can you use the full path to the command to execute it?
    For example: c:\Program Files\java\bin\jar.exe ...

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

    javapenguin (June 15th, 2010)

  11. #58
    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 Lord.Quackstar View Post
    Have you considered the NetBeans, Eclipse, or Intellij IDEA IDE's? They do this all for you. Knowing how to make a JAR file by hand is not a requirement for a Java developer, although it does come in handy.

    If you don't want to use an IDE, try this: Use ANT to Build a JAR with version/build number - Real's Java How-to
    Yes I could put it in Eclipse. Already have one in there, and all I would have to do would be to modify it.

    However, is there a way directly from Eclipse to make it do all of this very time consuming work for me? I've already tried a lot of the day.

    I think I have Eclipse SDK, not JRE or IDE or whatever it's called. I think I might have JRE, but not Eclipse IDE. Maybe it comes with.

  12. #59
    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, I finally got it to work. However, how do you get that evil Eclipse program to do that with programs that have println and are not just GUI?

  13. #60
    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.

    Is it possible to add a JMenu to the top of a JFrame?

  14. #61
    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.

    Perhaps not, but I can add one to a JFrame. I just did.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Return result from JOptionPane to JFrame
    By cselic in forum AWT / Java Swing
    Replies: 7
    Last Post: May 13th, 2010, 01:17 PM
  2. 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, 08:24 PM
  3. JOptionPane Question/ Printing
    By 03EVOAWD in forum AWT / Java Swing
    Replies: 2
    Last Post: August 31st, 2009, 09:17 AM
  4. Replies: 1
    Last Post: May 21st, 2009, 03:41 AM
  5. Using Icons in JOptionPane
    By Jchang504 in forum AWT / Java Swing
    Replies: 0
    Last Post: November 28th, 2008, 07:02 PM