JDK-4759311 : Applet does not when browser is resized to show more of the applet.
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-10-07
  • Updated: 2002-11-08
  • Resolved: 2002-11-08
Related Reports
Duplicate :  
Description

Name: gm110360			Date: 10/07/2002


FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]

ADDITIONAL OPERATING SYSTEMS :
Microsoft Windows XP


EXTRA RELEVANT SYSTEM CONFIGURATION :
Failed with both I.E. 6.0 and I.E. 5.5

A DESCRIPTION OF THE PROBLEM :
The applet is not redrawing areas that are hidden by making
the browser window width smaller than the width of the
applet, and then widening the window to reveal the part of
applet that was hidden.  This failure occured with my
applet, then I tried a bunch of applets in the java
tutorial and they _all_ failed as well.


REGRESSION.  Last worked in version 1.4

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Make sure the java plug in is using java version 1.4.1-
b21
2. Load a page with an applet into the browser, such as
http://java.sun.com/docs/books/tutorial/applet/overview/life
Cycle.html
3. Wait until the applet draws itself.
4. Reduce the width of the browser so that the browser
window width is less than the width of the applet.
5. Widen the browser window so that it is wide enough for
the entire applet to fit in the browser window.
6. Note that the newly revealed part of the applet has not
been redrawn.
7. Minimize and then restore the browser window to make the
applet redraw itself correctly.


EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected results are that the applet should draw in the
newly re-revealed part of itself.

Actual Results are that the applet does not draw in the
newly re-revealed area unless you minimize and then restore
the browser window.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error messages appeared.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
This is the source code for the applet shown on the tutorial page
at "http://java.sun.com/docs/books/tutorial/applet/overview/lifeCycle.html"

/*
 * 1.0 code.
 */

import java.applet.Applet;
import java.awt.Graphics;

public class Simple extends Applet {

    StringBuffer buffer;

    public void init() {
	buffer = new StringBuffer();
        addItem("initializing... ");
    }

    public void start() {
        addItem("starting... ");
    }

    public void stop() {
        addItem("stopping... ");
    }

    public void destroy() {
        addItem("preparing for unloading...");
    }

    void addItem(String newWord) {
        System.out.println(newWord);
        buffer.append(newWord);
        repaint();
    }

    public void paint(Graphics g) {
	//Draw a Rectangle around the applet's display area.
        g.drawRect(0, 0, size().width - 1, size().height - 1);

	//Draw the current string inside the rectangle.
        g.drawString(buffer.toString(), 5, 15);
    }
}

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
You must minimize, then restore the browser window to cause
the applet to repaint the re-revealed area.
(Review ID: 165467) 
======================================================================

Comments
EVALUATION Duplicate of bug #4774159 ###@###.### 2002-11-08
08-11-2002