JOptionPane in jre 1.6

Discussion in 'Java' started by Mr. X., Jun 27, 2007.

  1. Mr. X.

    Mr. X. Guest

    Hello,
    I have Eclipse 3.2.2 and jre 1.6 installed.

    I have tried to insert new class, that use JOptionPane,
    but I have written :
    package javax.swing.JOptionPane and it's an unknows class in Java.
    Are newer version ommited JOptionPane, and what is the alternative of
    JOptionPane ?

    Thanks :)
    Mr. X., Jun 27, 2007
    #1
    1. Advertising

  2. Mr. X.

    Eric Sosman Guest

    Mr. X. wrote On 06/27/07 17:24,:
    > Hello,
    > I have Eclipse 3.2.2 and jre 1.6 installed.
    >
    > I have tried to insert new class, that use JOptionPane,
    > but I have written :
    > package javax.swing.JOptionPane and it's an unknows class in Java.
    > Are newer version ommited JOptionPane, and what is the alternative of
    > JOptionPane ?


    Use

    import javax.swing.JOptionPane;

    Note "import" instead of "package".

    --
    Eric Sosman, Jun 27, 2007
    #2
    1. Advertising

  3. Mr. X.

    IchBin Guest

    Eric Sosman wrote:
    > Mr. X. wrote On 06/27/07 17:24,:
    >> Hello,
    >> I have Eclipse 3.2.2 and jre 1.6 installed.
    >>
    >> I have tried to insert new class, that use JOptionPane,
    >> but I have written :
    >> package javax.swing.JOptionPane and it's an unknows class in Java.
    >> Are newer version ommited JOptionPane, and what is the alternative of
    >> JOptionPane ?

    >
    > Use
    >
    > import javax.swing.JOptionPane;
    >
    > Note "import" instead of "package".
    >


    Just to let you know, since you are using Eclipse, you can automatically
    let Eclipse resolve all of your imports. Just do one of the following:

    - Ctrl+Shift+O
    - Menu Source \ Organize Imports

    --
    Thanks in Advance... http://weconsulting.org
    IchBin, Philadelphia, Pa, USA http://ichbinquotations.weconsulting.org
    ______________________________________________________________________
    'If there is one, Knowledge is the "Fountain of Youth"'
    -William E. Taylor, Regular Guy (1952-)
    IchBin, Jun 28, 2007
    #3
  4. Mr. X.

    Roedy Green Guest

    On Thu, 28 Jun 2007 00:24:46 +0300, "Mr. X."
    <no_spam_please@nospam_please.com> wrote, quoted or indirectly quoted
    someone who said :

    >I have Eclipse 3.2.2 and jre 1.6 installed.

    Start with HelloWorld. See
    http://mindprod.com/jgloss/gettingstarted.html

    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
    Roedy Green, Jun 28, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SuperChuck
    Replies:
    3
    Views:
    4,088
    Sandip Chitale
    Aug 7, 2003
  2. nospawn
    Replies:
    2
    Views:
    514
    Real Gagnon
    Apr 25, 2006
  3. Prasoon
    Replies:
    1
    Views:
    467
    Andrew Thompson
    Apr 13, 2007
  4. Artur McCennon
    Replies:
    0
    Views:
    399
    Artur McCennon
    Jul 22, 2009
  5. Jochen Brenzlinger
    Replies:
    5
    Views:
    922
    Roedy Green
    Sep 2, 2011
Loading...

Share This Page