Java Help

Discussion in 'Software' started by brishu, Nov 8, 2007.

  1. brishu

    brishu

    Joined:
    Nov 8, 2007
    Messages:
    3
    Hi, I'm pretty new to Java and I need to know how to use a switch statement for this piece of code

    String choices [] = {"Check your Pin", "Check your Password",
    "Find what Level your mark is in",
    "Find the final mark on your test"};

    Object responseString = JOptionPane.showInputDialog (
    null
    , "What do you want to do"
    , "Options"
    , JOptionPane.INFORMATION_MESSAGE
    , null
    , choices
    , choices [0] );


    i need to find a way to turn this into a switch statement .... can you help me???

    And I know i could just use JOP.showOptionDialog , but i'm suppossed to use this... any ideas???

    (I think )I need to find out which button was picked and then use the array number of that(/I think )... HELP PLZ
     
    brishu, Nov 8, 2007
    #1
    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. Fernando Kohan

    JAVA VIRTUAL MUCHINE OR SUN JAVA

    Fernando Kohan, Nov 13, 2004, in forum: Firefox
    Replies:
    1
    Views:
    868
    Clark
    Nov 14, 2004
  2. dakine

    MS Java or Sun Java???

    dakine, Jul 20, 2004, in forum: Computer Support
    Replies:
    9
    Views:
    1,466
  3. emerald
    Replies:
    3
    Views:
    12,776
    The Modfather
    May 14, 2006
  4. chuck

    Firefox and Java - but no Java

    chuck, Mar 19, 2007, in forum: Firefox
    Replies:
    1
    Views:
    370
    Peter.Potamus.the.Purple.Hippo@gmail.com
    Mar 19, 2007
  5. -Dan-
    Replies:
    0
    Views:
    558
    -Dan-
    Aug 5, 2005
Loading...

Share This Page