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?

[329 byte] By [snoopybad77a] at [2007-10-3 4:29:49]
# 1
Check out this posting: http://forum.java.sun.com/thread.jspa?threadID=766225
camickra at 2007-7-14 22:32:58 > top of Java-index,Java Essentials,Java Programming...
# 2
Well, i didn't find anything about BufferStrategy... Is there a compatible example?I use netbeans and win XP, so i think is the most common way to work...
snoopybad77a at 2007-7-14 22:32:58 > top of Java-index,Java Essentials,Java Programming...
# 3
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.
tymer99a at 2007-7-14 22:32:58 > top of Java-index,Java Essentials,Java Programming...
# 4

> 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.

camickra at 2007-7-14 22:32:58 > top of Java-index,Java Essentials,Java Programming...
# 5

>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)

snoopybad77a at 2007-7-14 22:32:58 > top of Java-index,Java Essentials,Java Programming...
# 6
Right. This is a general forum, so you're going to get general answers -- which you did. If you want specific answers -- and it sounds like you do -- then ask in a specific forum.
DrClapa at 2007-7-14 22:32:58 > top of Java-index,Java Essentials,Java Programming...