United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6651293 Red X should show up when exceptions are thrown in init() and start()
JDK-6651293 : Red X should show up when exceptions are thrown in init() and start()

Details
Type:
Bug
Submit Date:
2008-01-16
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-03-25
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b13)

Related Reports
Relates:
Relates:

Sub Tasks

Description
It was pointed out by user linuxhippy on the java.net forums (http://forums.java.net/jive/thread.jspa?threadID=35333&tstart=0) that the Red X is not showing up in the new plug-in when an exception is thrown in either init() or start(). It does in the old plug-in. The attached test case shows the difference in behavior.

                                    

Comments
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/deployment_data/6u10/6651293.0
                                     
2008-02-02
EVALUATION

In the old java plugin, we don't "shutdown" the GrayBoxPainter until we're ready to destroy the applet. In the new java plugin design, the same approach won't work because there's only one component contained inside the embedded frame. We can either show the applet or something else such as the red X error icon.
>
> The fix involves catching exception resulting from calling the applet's init() and start() methods and calling showAppletException() which delegates to the GrayBoxPainter to show the red X error icon. Initially, the GrayBoxPainter was used to show the animation during applet loading. Before showing the red X error icon, we need to shutdown the GrayBoxPainter and in showAppletException() a GrayBoxPainter is created if needed. Also, before showing the red X error icon, we need to remove the applet from the embedded frame.
                                     
2008-02-02



Hardware and Software, Engineered to Work Together