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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.2, 1.4.1
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_2000

      Description



      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)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: