-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.2.1
-
x86
-
windows_nt
Name: krT82822 Date: 07/01/99
Calling setBackground(Color.lightGray) does not work.
It set the background to white. This is not a problem with 1.1.7.
-------------------
kevin.ryan@eng -- verified, even with JDK 1.2.2 RC1. Thought we already had a bug re. this, but couldn't find it.
import java.awt.*;
public class blah extends Frame {
public blah() {
super();
// couldn't get it to work without Swing-style semantics
getContentPane().setLayout(new BorderLayout());
TextArea ta = new TextArea();
ta.setSize(200,200);
ta.setBackground(Color.lightGray);
ta.setForeground(Color.blue);
ta.setText("This is the full extent of the text behind which we'd like to see a light Gray background.");
getContentPane().add(ta, BorderLayout.CENTER);
pack();
}
public static void main(String[] args) {
blah f = new blah();
f.setLocation(200, 200);
f.setVisible(true);
}
}
(Review ID: 85068)
======================================================================
- relates to
-
JDK-4072399 Setting background color in TextField
- Closed