Please help, I am building a Java applet, and it wont let me display variables. See, this code works:
g.drawString("wassup",50,25);
But this code doesn’t:
int timerx = 10000;
g.drawString(timerx,50,25);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two
Graphics.drawString()methods. One accepts aStringas a first argument and the other accepts anAttributedCharacterIterator. You are attempting to pass anintas the first argument, but there is no method that matches that signature.If you want to print the characters
"10000", try the following code.