Hi all,
I did some digging to see what we might be able to do to resolve the
flickering that occurs when scrolling a web page that contains a Pivot
applet. The flicker is caused when the background of the applet peer
is repainted before the Pivot display is called to paint. Sun provides
two system properties that control this behavior:
sun.awt.noerasebackground
sun.awt.erasebackgroundonresize
Setting these values to "true" eliminates the flicker. We currently
set them in the DisplayHost, but they can only be set by trusted code.
As a result, signed applets won't currently display the issue, but
untrusted applets will.
Fortunately, recent versions of the Java Plugin allow the caller to
specify a limited set of JVM arguments as an applet parameter, and
these properties are in the list of supported arguments. So, to
eliminate the flicker in untrusted applets, you can pass these using
the java_arguments applet param:
http://java.sun.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html#JAVA_ARGUMENTS
For example:
<param name="java_arguments" value="-Dsun.awt.noerasebackground=true -
Dsun.awt.erasebackgroundonresize=true">
Unfortunately, the properties don't appear to have any effect in Mac
OS X, but they do seem to work in Windows (I haven't tested Linux).
Hope this helps. I will be updating all of the demos and tutorials to
include these arguments.
Greg