Sounds like your not setting the display positions correctly.
Have you tried debugging your code by displaying values using println()?
If you println() the variables as they change you should be...