Results 1 to 6 of 6
- 08-18-2011, 01:05 AM #1
Member
- Join Date
- Aug 2011
- Posts
- 3
- Rep Power
- 0
[Please Help] JCreator Error Failed to Find symbol
Hello, i am very new to JCreator and java in general... i am currently in a class, and our homework assignment was to write a simple program that would do some calculations... after confirming the code i had written in class (on paper) with my teacher i came home and attempted to put it into JCreator after receiving an error and failing multiple times to fix it i was looking for some help
Here's the code thus far (i removed much of it in an attempt to fix it and its currently like this)
and this is the error i am gettingJava Code:import javax.swing.JOptionPane; public class calculator { public static void main(String[] args) { String value1 = JOptionPane.showInputDialogue("Enter value 1 here"); } }
any help would be nice and sooner would be better because i have to email the finished code to my teacher tonight... anyways thanks for any postsJava Code:--------------------Configuration: <Default>-------------------- C:\Users\Matthew MacDonald\Documents\JCreator LE\MyProjects\calculator.java:5: cannot find symbol symbol : method showInputDialogue(java.lang.String) location: class javax.swing.JOptionPane String value1 = JOptionPane.showInputDialogue("Enter value 1 here"); ^ 1 error Process completed.
- 08-18-2011, 01:13 AM #2
Oh come on. Did you read the error message?
You are trying to call a method called "showInputDialogue" in the JOptionPane class. Does that method exist? If you do not know go to the Java API and find out.
- 08-18-2011, 01:45 AM #3
Member
- Join Date
- Aug 2011
- Posts
- 3
- Rep Power
- 0
Thanks for your input... didnt know what the error message meant... showInputDialogue doesn't exist as u implied... i am simply following what i learned in the class but i probably copied down my notes incorrectly... (although i did get the teachers confirmation that i had set up the code properly)
so how do i allow for user input? also the next step in the process according to my teacher would be to turn the inputed value into an int value through this line
int name = Integer.parseInt(" ")
with 'name' being what you wanted the integer to be named and the space in between the quotation marks to be replaced with the name of the String value
is this also incorrect?
Thank you for your time and sorry im so bad at this :P
- 08-18-2011, 01:50 AM #4
You have to call a method that exsits. Check carefully how you spelt the method name.
- 08-18-2011, 02:39 AM #5
Member
- Join Date
- Aug 2011
- Posts
- 3
- Rep Power
- 0
hey i looked back through the Java API as you suggested and it turns out that the correct line is
JOptionPane.show.InputDialog("")
not JOptionPane.show.InputDialogue("")
Thank you very much for all of your help
- 08-18-2011, 02:52 AM #6
Similar Threads
-
Cannot find symbol error?
By Josep_16 in forum New To JavaReplies: 2Last Post: 06-19-2011, 07:14 PM -
Error: Cannot Find Symbol
By mawright in forum New To JavaReplies: 4Last Post: 04-14-2011, 02:41 PM -
Cannot find symbol error
By rajivjoshi in forum New To JavaReplies: 3Last Post: 05-31-2010, 10:13 AM -
cannot find symbol symbol :constructor Error. Please help! =(
By KalEl in forum New To JavaReplies: 9Last Post: 10-18-2008, 08:26 PM -
'Cannot find symbol' error
By minihazard10 in forum New To JavaReplies: 6Last Post: 10-10-2008, 04:05 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks