Please don't paraphrase the error message, but rather when asking here, show the actual error message in its entirety so we don't have to guess what's really wrong. So, speaking of guessing, I'm going to guess now: do you import ActionListener?
Yes your guess was correct. I am now having another problem.
In that line.Code:
displayMessage = new JLabel (guiDie1.getMessage()); //cannot find symbol - method getMessage()
Again, please show the entire error message.
Also show the pertinent code. I don't even see where you declare the variable you're using on that line. Your class's code is not fully shown in your post.
Test.java:5: ';' expected
Scanner kybd = new Scanner(System.in)
The full message provides useful info such as the class and line number where it occurs. it also attempts to place the ^ reasonably close to exactly where on the line the error is.
Your code has changed?!
You were posting:
And now your posting:Code:
displayMessage = new JLabel (guiDie1.getMessage());
This is getting too confusing for me.Code:
displayMessage = new JLabel (GVDie1.getMessage());
Where in the GVdie class is the getMessage method?
So the error is telling your that your GVdie class doesn't have a getMessage() method, not with that message signature. So the obvious place to look is in the ... GVdie class. Does it have such a method with the correct signature? The error messages aren't very cryptic and usually tell you exactly what's wrong -- as is the case here.
No there isnt a method with that signature. I was provided the GVdie class and have to use the one provided for the program. getMessage isnt in GVdie class....but i need it to display the current message.
Well you cannot call a method that does not exist. So either call a method that does exist or change what you are trying to do.
Would anyone be able to help me on MSN or another form of messenger? This project is due tomorrow.
What's wrong with the help you are getting so far?