Googling for this I have found this: 
http://swingwt.sourceforge.net/javadoc/swingwt/awt/image/VolatileImage.html
but that is in another Swing implementation.

As of JDK 1.5, all the buffered images created using the constructors of the 
BufferedImage class are managed images. Given that, using VolatileImage as a 
back buffer in RepaintManager does still offer a significant performance 
improvment ?

I am asking this because I've done a nice thing with RepaintManager:
[code]
package myjavaextension.swing;

import java.awt.*;
import java.awt.image.BufferedImage;

import javax.swing.RepaintManager;

public class BlackAndWhiteRepaintManager extends RepaintManager {

   private BufferedImage offscreenBuffer;

   public BlackAndWhiteRepaintManager() {
      super();
      init();
   }

   private void init() {
      Dimension maximumSize = super.getDoubleBufferMaximumSize();
      offscreenBuffer = new BufferedImage(
         maximumSize.width, maximumSize.height, BufferedImage.TYPE_BYTE_GRAY );
   }

   @Override
   public Image getOffscreenBuffer( Component c, int proposedWidth, int 
proposedHeight ) {
      return offscreenBuffer.getSubimage( 0, 0, proposedWidth, proposedHeight );
   }

   @Override
   public Image getVolatileOffscreenBuffer( Component c, int proposedWidth, int 
proposedHeight ) {
      return null;
   }
}
[/code]
Installing this repaint manager will render a gray UI.

But I am affraid that the performance of using VolatileImage as a back buffer 
is lost.
[Message sent by forum member 'jsarmis' (jsarmis)]

http://forums.java.net/jive/thread.jspa?messageID=140430

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to