automatic buffering?
does javax swing components handle automatic buffering?
My experience says not...
I've tried tu use BufferStrategy but there is a problem with a IllegalState
Exception: component must have a valid peer. If you have used this class i think you know it...
Is there a good example for BufferStrategy?
Do you mean double buffering? If so, then see [url http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JComponent.html#setDoubleBuffered(boolean)]JComponent.setDoubleBuffered()[/url]. Some components that extend JComponent, such as JPanel, have this set to true by default.
> Well, i didn't find anything about BufferStrategy...
It didn't say there was anything about BufferStrategy. Why do you think you need it?
The first point from that link was that Swing related questions should be posted in the Swing forum.
The second point was that there is a tutorial on custom painting which shows you how to do animation.
>Do you mean double buffering? If so, then see >JComponent.setDoubleBuffered(). Some components that extend >JComponent, such as JPanel, have this set to true by default.
Thanks, but double buffering is easy to implementate; i'd would like hava an automatic buffering like BufferStrategy
> > Well, i didn't find anything about
> BufferStrategy...
> It didn't say there was anything about
> BufferStrategy. Why do you think you need it?
> The first point from that link was that Swing related
> questions should be posted in the Swing forum.
> The second point was that there is a tutorial on
> custom painting which shows you how to do animation.
This is a genral forum, so i think is possible ask about all the question (not too specific..) What does it mean general, if it isn 't so?
Whatever, if you'll try to do an animation, you'll discover the importance of BufferStrategy to have an optimal efficiency. But there isn't a good example in all the web!! (pheraps)