If you're implying my draw() function is in the wrong spot, I have stuck it in every conceivable spot. All to the same result. Even commented it out for shits and giggles. Same result.
All spots except one would lead to the same result. As such your efforts to permute through all of them were unfortunately in vain. Commenting it out wouldn't cause the desired effect either. I assume you know this by now.
So stop with your undeserved cockiness, and just tell me what I'm doing wrong, if anything.
First of all, I try to help the best I can, and after reviewing your code, I saw an error in it. Posting obviously erroneous code without mentioning that you have tried other variants of it (which are also more correct) and expecting someone to help you without mentioning the error I already quoted is asking for someone to read your mind, which I can not yet do. Normally I would ask for a more complete example that I could compile for myself, however based on the aforementioned assumption I deemed it unnecessary. Now that you have asserted that making the calls in the right order also leads to the same results I would be willing to help you if there was a more complete example.
Because this worked just fine in 1.6.
If you refer to your posted code when you say "this", then no, it wouldn't have worked in 1.6 either. Getting the drawing and clearing order wrong never works, anywhere.