Double buffering with Swing?
Hello!I'm taking a course in Internetprogramming. Now we have a task to create a applet that works like the demo-applet "NervousText". But our task is to use Swing components with double buffering. Correct me if I'm wrong when I say that Swing uses double buffering as default, but I have tried to turn it off but I do not see any performance loss at all. If I do the same with AWT components I can see a great difference in performance.
At this site I got 4 applets that tries do demonstrate this.
http://medlem.spray.se/fredand44/mint/1e/1e.html
1 Swing-applet with setDoubleBuffered(false)
1 Swing-applet with setDoubleBuffered(true) or default
1 AWT-applet without double buffering
1 AWT-applet with double buffering
So if any one could tell me if there is a better way to create Swing componets with double buffering and how to turn it off please tell me.
Perhaps some one could explaine to me why I do not see any difference in performance between setDoubleBuffered(false/true) when I use Swing components? Is there an other way to create Swing componets with double buffering?
Best regards
Fredrik
BTW please give "svar" so I can reward all of you!
