Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

My text is below an Image but my other text is above the image. I can't find out why. It just have an if statement.

if(renderText==false)
    {
        g.drawString("heelo", 300, 600);
    }

Even other text with more if statements are overlapping the image. How do I fix this?

share|improve this question
1  
You don't show any revenant code. In you want your two texts to be rendered on top of your image, just draw then BEFORE the image in your code. – nathan Oct 5 '12 at 8:17

closed as too localized by Jari Komppa, bummzack, Josh Petrie, mh01, Jonathan Hobbs Oct 6 '12 at 23:55

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

change the x,y pixel coordinates on the drawString(str,x,y) method call:

 g.drawString("heelo", 300, 400);
 g.drawString("heelo", 300, 500);
 g.drawString("heelo", 300, 600);
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.