JDK-4518431 : Repaint problem in Plugin1.4 when is applet is covered/uncovered by other appln.
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2001-10-23
  • Updated: 2001-10-31
  • Resolved: 2001-10-31
Related Reports
Duplicate :  
Relates :  
Description

Name: yyT116575			Date: 10/23/2001


java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)


PROBLEM DESCRIPTION:
   When the applet is covered & uncovered by other Application or another
Browser window,the repaint of the Applet is not proper.

STEPS TO REPRODUCE THE PROBLEM:
   Load the applet in a Browser window.
   Cover & uncover the applet by another Browser window or Application.
   The Repaint is not proper.

JAVA SOURCE CODE:
   JavaJS.java====================
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import netscape.javascript.JSObject;
import javax.swing.*;


public class JavaJS extends Applet {

  TextField text;
  Button b;
  Frame frame;
  Label l;

  public void init(){
    b=new Button("JavaToJS");
    add(b);
    b.addActionListener(new ButtonAction());
 }

  public class ButtonAction implements ActionListener{
    public void actionPerformed(ActionEvent e){
      JSObject o = (JSObject)JSObject.getWindow(JavaJS.this);
      if(o!=null)
        o.call("hello", null);
      else
        System.out.println("Unable to get the JSObject(Browser Window)");
    }
  }
}

   JavaJS.htm=========================
<html>
<head>
</head>
<script>
  function hello() {
    alert ("Java to JS Communication Successful");
  }
</script>

<body>
<center>
<!-- Uncomment the following tag for loading the Applet in IE with Plugin -->
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
        id="cim" WIDTH=190 HEIGHT=190 codebase="." name="JavaJS">
<PARAM NAME=CODE         VALUE="JavaJS.class">
<PARAM NAME=MAYSCRIPT    VALUE=TRUE>
<PARAM NAME=SCRIPTABLE    VALUE=TRUE>
</OBJECT>

</center>
</body>

</html>
(Review ID: 134274) 
======================================================================

Comments
WORK AROUND Name: yyT116575 Date: 10/23/2001 None. ======================================================================
11-06-2004

EVALUATION This is a known awt bug. Close this bug as duplicate of 4512592 ###@###.### 2001-10-31 This is not a duplicate of 4512592, and should not have been closed. I believe the problem was eventually fixed by the 2D team in 1.4.1_02 and 1.4.2. Unfortunately, closing this bug incorrectly has led to a lot of confusion and misunderstanding for developers and customers, including our own customer support organizations. I am updating this report now in an attempt to prevent further misunderstandings. ###@###.### 2003-08-28
28-08-2003