This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Starting Java and can't seem to get j option pane to work, followed a tutorial on YouTube to help and done everything the exact same and an error is still appearing.
Error is on line 10: cannot find symbol method showInputDialogue(java.lang.String)
Was wondering if anyone could help.
Thanks
Have another look at the video and check the spelling of that method name.
And if it's spelt the same in the video, then it's an error. You can find the correct method name in the javadoc - JOptionPane
Joanne
Bat Gang
Greenhorn
Joined: Dec 04, 2012
Posts: 2
posted
0
Yea everything is spelled right, i am kinda new to java so that document is really not much use to me, don't understand much of it, i was just wondering if you knew why mine was showing an error and the one on the video wasn't?
Thanks.
Bat Gang wrote:Yea everything is spelled right . . .
No it's not. It's not event spelled like you wrote it in the video you posted. Here you have the exact name of the method: JOptionPane#showInputDialog.
The quieter you are, the more you are able to hear.
Joanne Neal wrote:Have another look at the video . . .
No, Joanne, I would recommend avoiding that video like the plague. There are lots of good tutorials available and that ain’t one of them, because:-
1: It is old, using JDK1.4
2: It only shows one method, not mentioning its overloadings, nor the other option pane methods.
3: There are formatting problems in the code, ie long lines, inconsistent indentation and inconsistent use of {}.
4: The commentary mentions a JOptionPane “object”, appearing not to realise that is a static method and no such object exists. It even changes from object to class within two sentences.
They do however spell the method name correctly.
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
Campbell Ritchie wrote:They do however spell the method name correctly.
That was the only reason I suggested watching the video again, because the OP had erroneously claimed that he had
done everything the exact same
I haven't actually watched the video, so couldn't comment on it's quality.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32830
4
posted
1
Joanne Neal wrote: . . . I haven't actually watched the video . . .
You haven’t missed anything
Trouble is, anybody can post a tutorial and nobody corrects it. If I post rubbish here, there are lots of people, yourself included, who will set me right. Which is one of the reasons fora like this are better than tutorials.