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)
======================================================================
- duplicates
-
JDK-4512592 Regression: Applet in embedded frame doesn't repaint background properly
-
- Closed
-
- relates to
-
JDK-4521474 Panel does not repaint itself on Windows only.
-
- Closed
-