[Swing]setDoubleBuffered: qu'en est-il ?
Bonsoir à tous,
en lisant la javadoc de la classe JComponent, je suis tombé sur la méthode setDoubleBuffered...
D'après la description, il semblerait que cette méthode fait tout le travail lié au double-buffering... à quoi cela peut-il bien servir de l'implémenter nous-même ?
En fait, d'après la FAQ et certaines réponses glanées sur le forum, je croyais qu'il fallait le faire nous-même (utilisation méthode createImage, etc...)
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JComponent.html
Citation:
Envoyé par Javadoc de la classe JComponent
setDoubleBuffered
public void setDoubleBuffered(boolean aFlag)
Sets whether the this component should use a buffer to paint. If set to true, all the drawing from this component will be done in an offscreen painting buffer. The offscreen painting buffer will the be copied onto the screen. Swings painting system always uses a maximum of one double buffer. If a Component is buffered and one of its ancestor is also buffered, the ancestor buffer will be used.
Parameters:
aFlag - if true, set this component to be double buffered
Alors, qu'en est-il ? Cette méthode suffit-elle à utiliser le DB ? Sinon à quoi sert-elle ?