Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hmmm... ??

 
Jon Brasted
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code... (by a Java n00b )

and the error I get is...
App_SimpCntdwn.java:31: cannot resolve symbol
symbol : method drawString (int,int,int)
location: class java.awt.Graphics
g.drawString(countdown, 5, 20 + y); // this hopefully allows for a line space
^

Many thanks,
Jon
 
Carlos Failde
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method java.lang.String,%20int,%20int)" target="_blank" rel="nofollow">drawString is for drawing strings funnily enough. But you've not supplied it with a String, just three ints.
You can use String.valueOf(int i) to make a string out of an int. But my preferred way is to just concatenate the int to an empty string - viola instant string.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic