Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+15 votes
asked in CSC211_Winter2018 by (8 points)

2 Answers

+10 votes
Best answer

Try this:

int num = 42;
g.drawString("" + num, 100, 200);


g.drawString(Integer.toString(num), 100, 200);
answered by (3.1k points)
selected by
+8 votes

what do you mean int value in the drawing panel? The drawing panel is a class that you call in order to use graphics. The only way to print out numbers are to you use g.drawString because that is from the panel class.

answered by (8 points)