Name: rmT116609 Date: 08/11/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b60)
Java HotSpot(TM) Client VM (build 1.5.0-beta3-b60, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux jupiter 2.6.3-7mdk #1 Wed Mar 17 15:56:42 CET 2004 i686 unknown unknown GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
Mandrake Linux 10.0, KDE
A DESCRIPTION OF THE PROBLEM :
A JWindow created by an unsigned applet is not shown/painted completely. The attached code sets the JWindow's content pane to be an opaque panel with red background, yet only a thin stripe at the top and the left of the window is painted red.
With J2SE 1.4.2_05, the applet warning is not displayed but the entire contents of the window is painted red.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached code with appletviewer.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The window should be completely red, except for the applet warning.
ACTUAL -
Only a small portion of the window is red. The problem does not manifest itself if the code is run as an application.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Java source code:
import java.applet.*;
import javax.swing.*;
import java.awt.*;
public class WindowApplet extends Applet{
public void start(){
JFrame f = new JFrame("Test Frame");
f.setBounds(50, 50, 100, 100);
f.setVisible(true);
JWindow window = new JWindow(f);
JPanel panel = new JPanel();
panel.setOpaque(true);
panel.setBackground(Color.red);
window.setContentPane(panel);
window.setBounds(50, 50, 500, 500);
window.setVisible(true);
window.toFront();
}
public static void main(String [] args){
new WindowApplet().start();
}
}
HTML code for running as an applet:
<applet code="WindowApplet" width="100" height="100"></applet>
---------- END SOURCE ----------
(Incident Review ID: 296559)
======================================================================