|
-
Feb 15th, 2006, 10:43 PM
#1
Thread Starter
Junior Member
What is this error I am missing?
I'm fairly new to Java, but am I missing a very simple error here? when opened in Textpad, i'm getting this error.
C:\Course Technology\85983-4\Chapter04\Errors.java:37: cannot find symbol
symbol : method showMessageDialog(<nulltype>,java.lang.String,java.lang.String,java.lang.String,int)
location: class javax.swing.JOptionPane
JOptionPane.showMessageDialog(null, "Your ending mileage,",endMiles +", must be greater than your starting mileage, " + startMiles, "Error in Mileage", JOptionPane.ERROR_MESSAGE);
^
1 error
Tool completed with exit code 1
Last edited by Squirrel RJ; Feb 16th, 2006 at 08:28 AM.
-
Feb 16th, 2006, 06:46 AM
#2
Frenzied Member
Re: What is this error I am missing?
Check the method signatures of the JOptionPane. If I have more time this afternoon, then I'll help you out more, but I'm getting ready to leave.
-
Feb 16th, 2006, 09:26 AM
#3
Re: What is this error I am missing?
Your code should be:
Code:
JOptionPane.showMessageDialog(null,
"Your ending mileage," +
Integer.toString(endMiles) +
", must be greater than your starting mileage," +
Integer.toString(startMiles), "Error",
JOptionPane.ERROR_MESSAGE);
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|