| Author |
JOptionPane Input Dialog is blank
|
Maureen Augustus
Ranch Hand
Joined: Aug 18, 2006
Posts: 72
|
|
Hi, I'm hoping that A) this is the right form and B) this is not a duplicate question. I didn't find anything exactly like it in a search. Anyway, I'm new to Java and working on examples inmy schoolbook. When I run the code below, I get a blank window titled "Input". My only options are to Enter through the inputs, at which point I get a NumberFormatException because I haven't entered any numbers. I think my problem might have something to do with my Java versions. I believe I'm running 1.4.2, but 1.5 is installed on my system as well. Can anyone help? Thanks!
|
"Sex and drugs and women being set on fire! I've never heard of such a Christmas!" - Christine Baranski in "The Ref"
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
|
. . . and what are you writing in the blank space on the input dialogue?
|
 |
Scott Cook
Greenhorn
Joined: Aug 01, 2006
Posts: 14
|
|
must be the version... I compiled and ran using 1.5.0_07 and it worked just fine
|
 |
Maureen Augustus
Ranch Hand
Joined: Aug 18, 2006
Posts: 72
|
|
Hmmm, I'll have to figure out why it doesn't like 1.4.2. I got the example from a book written for 1.3, so I would think it wouldn't require a later version. Unfortunately, I need to learn 1.4.2 specifically, since that is the version used on the program I was hired to maintain and word here is that there are no plans to upgrade to 5 or 6 anytime soon. Campbell, to answer your question, I would type an integer in the dialog if it showed a box in which to do so. However, the entire dialog is blank. Thanks for your help, guys.
|
 |
Scott Cook
Greenhorn
Joined: Aug 01, 2006
Posts: 14
|
|
maybe they would let you install 1.5 in your local area, just to see if it works? Either that or re-install 1.4.2 All I know is that your code is fine, so there must be something wrong with your environment or JVM Scott
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
|
I think Scott Cook is right.
|
 |
Maureen Augustus
Ranch Hand
Joined: Aug 18, 2006
Posts: 72
|
|
In case anyone's still interested, I got the answer to this problem from someone on the Sun forums. I had to reduce my graphics acceleration by about three notches to make it work. Thanks for your help!
|
 |
 |
|
|
subject: JOptionPane Input Dialog is blank
|
|
|