JDK-7036663 : Java2D Demo is not displayed properly with appletviewer
  • Type: Bug
  • Component: client-libs
  • Sub-Component: demo
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2011-04-14
  • Updated: 2011-06-01
  • Resolved: 2011-06-01
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 7
7Resolved
Related Reports
Relates :  
Description
BACKGROUND
----------
This report derives from the recent evaluation of CR 7026051, which was filed against
appletviewer.  The evaluation stated the Demo applet was at fault.  This CR therefore
deals with the Demo applet bug specifically, as this is one of the JDK demo applets.


DESCRIPTION
-----------
The Java2D Demo is not displayed properly with appletviewer. After launching, the window is empty until it is resived, then the contents suddenly appear.


REPRODUCTION INSTRUCTIONS
-------------------------
Simply launch Java2Demo with the appletviewer as follows:

    appletviewer %JAVA_HOME%/demo/jfc/Java2D/Java2Demo.html

Observed result:
        Java2D applet not visible until window resized

Expected result:
        Java2D should be visible without resizing the window

Comments
EVALUATION After CR7041387 has been fixed and integrated in b143, the problem is not reproducible anymore, I tested the demo in solaris, linux and windows, the demo looks fine, so I am closing this bug as not a defect.
01-06-2011

EVALUATION After talked with Anthony Petrov, this issue is caused by fix 6852592, and it should be resolved with CR7041387 is delivered, but with my fix, he thinks generally looks safe. I sent an webrev to see we need to fix it or we avoid making any changes to it, since the demo applet will work as expected by default with JDK7.
03-05-2011

SUGGESTED FIX found validate() method is called in code, may need to change it to invalidate.
02-05-2011

EVALUATION The appletviewer not call revalidate its components before showing per current api, so if the app call validate before add new component, the new component will not show, it needs some triggers to show, that may cause the demo not show all components and need resizing to trigger the display.
02-05-2011