I just saw that I had an answer so firstly thank you for having given yourself the trouble of testing and for your suggestions.
I first question what is the point to run the code in the EDT?
If in fact I crammed a lot from this post.
I actually retested in SWING after making a detour by AWT and the animation seems to me correct and fluid, I can be pushed it too far!
Otherwise on the code after seeing with my program if I increased the resolution response times became disastrous, I actually at first like you did by adding a clipping zone. This works very well.
The only thing that bothered me in fact it is the structure of code having to redefine the Paint method which takes no parameters other than the Graphic, I did not really find it handy when you want to make something of a little more consistent. Since I started the method to write my code can be elegantly escaped me but I have not found!
The second solution I have tested for double buffering is the technique of "page flipping". And I understand how it works, with page flipping you can not do the clipping (the I want to have confirmation) since you have only a pointer to your video memory and a pointer to your display area and you're just switch the two. This does not seem too bad to walk but I think I still have to convert the format of my images in native format to achieve a better speed.
Also I found with this technique you do not override the paint method and then writing code is much easier.
Voili voilou, if you can confirm or refute my remarks I would be interested, since I have no certainty about what I just ennoncer
_____________________________
________
Manual Gate |
watch south park |
dog beds