Issues with your account? Bug us in the Discord!

Any Java programmers out there? Need a little help

I am writing a program for class using JOptionPane input and output windows. Wenever I have to ask a yes or No question I have to have the user type Y or N.

What I would like to do is have a window that has Yes and No buttons so my program is mostly point and click and I can get rid of the data validation loops.

If anyone knows how i can do this with JOptionPane the help would be greatly appreciated.

Comments

  • bobobobo (A monkey)
    Does [URL=http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html#features]this tutorial[/URL] help? Specifically, look at "showOptionDialog".
  • I think that might work, thank you bobo
  • bobobobo (A monkey)
    Any time. Sun's tutorial is actually pretty good, though sometimes hard to use as a reference.

    Report back on how it goes.
  • MundaneMundane Elite Ranger
    Use Python :)
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    Woo! Python!
  • If I knew Java, I would be coding tiny applets for I2P right now... but regrettably I don't... and the learning curve is proving *not* as smooth as I hoped.
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    Java's learning curve not smooth? Do you know C?
  • I do... even if I have mainly been using ordinary C, with only little bits of C++ included.

    I guess I should take a step backward... currently abandon the experiments with Kaffe... and try with Sun Java (unfortunately proprietary, but wider used -- hopefully more likely to behave in predictable fashion).

    Or perhaps I should simply check if the Kaffe people have published a new stable release (so I might get it installed properly). Could have occurred by now (last downloaded from CVS in November).
  • C_MonC_Mon A Genuine Sucker
    I'm trying to learn Java at the moment...but it takes time as allways. :(
  • yes bobo, it worked perfectly, thank you.

    Now, what is Python?
  • BigglesBiggles <font color=#AAFFAA>The Man Without a Face</font>
    [url]http://python.org/[/url]
  • The Cabl3 GuyThe Cabl3 Guy Elite Ranger
    What about Flash anyone know any decent tutorials out there?
  • JackNJackN <font color=#99FF99>Lightwave Alien</font>
    [QUOTE][i]Originally posted by Akrovah [/i]
    [B]
    Now, what is Python? [/B][/QUOTE]

    Damn funny British Humor if you ask me...

    ;)
  • JackNJackN <font color=#99FF99>Lightwave Alien</font>
    [QUOTE][i]Originally posted by The Cabl3 Guy [/i]
    [B]What about Flash anyone know any decent tutorials out there? [/B][/QUOTE]

    This is something I'm going to have to get into as well. I know the trick is layers (like Photoshop) and looped anims.

    You know what else, I have started to see a lot of commercials done in Flash (probably produced in a 3D app and converted over). I wouldn't think something like that would come from Shockwave/Director, but then what do I know...
  • The Cabl3 GuyThe Cabl3 Guy Elite Ranger
    Guess we're in the same boat Jack so anything I find I'll send pm ya.
  • [QUOTE][i]Originally posted by JackN [/i]
    [B]Damn funny British Humor if you ask me...

    ;) [/B][/QUOTE]

    Yes, I'm aware of that Pyhon, thanks Jack:)
  • MundaneMundane Elite Ranger
    Only using C# and Python myself atm, havent touched JAVA for over a year...

    [url]www.toothcontrol.com[/url] :)
Sign In or Register to comment.