JDK-6624980 : Support animated GIF images for custom loading screens in Plugin
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-11-01
  • Updated: 2011-05-13
  • Resolved: 2008-02-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10 b12Fixed 7Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
As documented here:
http://java.sun.com/javase/6/docs/technotes/guides/plugin/developer_guide/special_attributes.html
one can use the following syntax to provide a custom splash/startup screen for an
applet, which overrides the default Java Plugin animation:
  <APPLET ...>
  <PARAM name="image" value="my_image.gif">
  </APPLET>

The problem is that if one provides an animated GIF image, only the first frame
is shown, so this solution cannot be used to provide a custom "loading..." screen
that provides user feedback.  We need to fix the Java Plugin so that it can
display animated GIF images properly in this context.

Many customers have requested a way to override the default Java Plugin animation,
since in many cases it clashes with the aesthetics of a website or may conflict with
their own branding requirements.  While an animated GIF isn't the most ideal solution
to this problem, it is a reasonable stopgap until such a time that we can provide
a more complete solution.  (For one thing, we currently have no way to make a custom
animated GIF show the true loading progress of an applet, so these custom animated
GIFs would have to be more of an indeterminate progress indicator, which is better
than a static image at least.)

Also requested a number of times in the comments of this blog entry:
http://weblogs.java.net/blog/campbell/archive/2007/02/orange_box_new.html

Comments
EVALUATION Added support for animated GIF images in the custom loading screen in the Java Plug-In by adding an ImageObserver watching for the ImageObserver.FRAMEBITS notification and scheduling a repaint. Technique suggested by ###@###.###. As part of this fix, cleaned up a couple of places in the GrayBoxPanel which were doing painting of the component in a thread-unsafe or otherwise discouraged manner. Also as part of this fix, added two new parameters for better control of the behavior of the gray box painter. The boolean parameter "centerimage", with default to false (necessary for backward compatibility), places the custom image in the center of the applet's area rather than at the upper-left corner. The boolean parameter "boxborder", with default to true (again necessary for backward compatibility), can be set to "false" to disable the drawing of the single-pixel border around the edge of the custom image, which was causing flickering in some situations. These new parameters will be sent through the CCC and documented under 6652734.
24-01-2008

EVALUATION I believe we should focus on implementing this in the new Java Plug-In. Perhaps the same mechanism (or even code) can be used for the old one. Recategorizing to plugin2 subcategory.
01-11-2007