-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
1.2.2, 1.4.1
-
generic, x86
-
generic, windows_2000
Name: mc57594 Date: 01/10/2000
java version "1.2.2"
HotSpot VM (1.0.1, mixed mode, build g)
If I create JButton instances that take advantage of the ability to specify the
label using HTML syntax, the label does not correctly reflect the state of the
button. Disabling the button shows the border get drawn correctly, but the
label is drawn in the enabled state.
====================
import java.awt.*;
import javax.swing.*;
public class Bug extends Object
{
public static void main( String[] args )
{
JFrame frame = new JFrame();
Container content = frame.getContentPane();
content.setLayout(new GridLayout(4, 1));
JButton b1 = new JButton("Plain Button: Enabled");
JButton b2 = new JButton("Plain Button: Disabled");
JButton b3 = new JButton("<html>HTML Button: Enabled");
JButton b4 = new JButton("<html>HTML Button: Disabled");
b2.setEnabled(false);
b4.setEnabled(false);
content.add(b1);
content.add(b2);
content.add(b3);
content.add(b4);
frame.pack();
frame.setVisible(true);
}
}
(Review ID: 99732)
======================================================================
- duplicates
-
JDK-4740519 HTML JLabel not greyed out on setEnabled(false)
- Closed