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
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.
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);