Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4303706

Disabled buttons that are using HTML text do not use correct color

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.2, 1.4.1
    • client-libs
    • 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)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: