Name: gm110360 Date: 05/10/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed code)
OPERATING SYSTEM: SuSE Linux 7.3j
# rpm -qa | grep glibc
glibc-2.2.4-40
# uname -a
Linux 2.4.16 i686 unknown
A DESCRIPTION OF THE PROBLEM :
I am using JFrame for my application. In order to share
classes, I created an extension of java.awt.Container and
added this container via myFrame.setContentPane(cont). Every
time I start the application I get a black or colourful
distorted background although I tried
cont.setBackground(Color.white). When I maximize the window,
the background is always black (but input fields are shown
correct).
REGRESSION. Last worked in version 1.3.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. create an extension of java.awt.Container
2. create a new JFrame and set the content pane
3. set the background colour of the container
EXPECTED VERSUS ACTUAL BEHAVIOR :
I wanted to have a white background :-) It seems that
setBackground has no effect.
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Container;
import javax.swing.JFrame;
import java.awt.Color;
class MyContainer extends Container {
MyContainer() {
super();
}
}
class MyApp extends JFrame {
public static void main(String args[]) {
new MyApp();
}
MyApp() {
super("My Application");
MyContainer cont = new MyContainer();
cont.setBackground(Color.white);
this.setContentPane(cont);
this.show();
}
}
---------- END SOURCE ----------
Release Regression From : 1.3.1_03
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 146276)
======================================================================