-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.1
-
x86
-
windows_2000
Name: gm110360 Date: 09/02/2002
FULL PRODUCT VERSION :
java version "1.4.1-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b19)
Java HotSpot(TM) Client VM (build 1.4.1-rc-b19, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
When using HTML in a JLabel, setEnabled does not grey out
the label, as in an ordinary label. It is important it
supports this behaviour because labels are often used with
other greyed out components (possibly in a bordered panel),
and when the other components are greyed out as a group,
the labels should be greyed out too; otherwise the
appearance is poor.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.See the source code below
2.
3.
EXPECTED VERSUS ACTUAL BEHAVIOR :
This is obvious when running the example below; both labels
should look the same, but they don't.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JLabel;
import javax.swing.JFrame;
import java.awt.FlowLayout;
import java.awt.Container;
public class Bug extends JFrame {
public Bug() {
Container cp = getContentPane();
cp.setLayout(new FlowLayout());
JLabel l1 = new JLabel("Ordinary label");
l1.setEnabled(false);
cp.add(l1);
JLabel l2 = new JLabel("<html>Html label</html>");
l2.setEnabled(false);
cp.add(l2);
pack();
show();
}
public static void main(String a[]) {
new Bug();
}
}
---------- END SOURCE ----------
CUSTOMER WORKAROUND :
None known by me
(Review ID: 163929)
======================================================================
- duplicates
-
JDK-4303706 Disabled buttons that are using HTML text do not use correct color
- Closed