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

Checkbox is changing it's state after removing from CheckboxGroup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.2
    • 1.4.0
    • client-libs
    • None
    • mantis
    • sparc
    • solaris_7



      Name: atR10191 Date: 08/06/2002


      Checkbox is changing it's state after removing from CheckboxGroup.
      See the example below.
      ============ Checkbox0020.java ==============================================
      import java.awt.*;

      public class Checkbox0020 {
          public static void main(String[] args) {
              CheckboxGroup g = new CheckboxGroup();
              Checkbox chb = new Checkbox("Label", true, g);
              chb.setCheckboxGroup(null);
              if (chb.getState() == true ) {
                  System.out.println("OKAY");
                  System.exit(0);
              }
              System.out.println(" failed");
              System.exit(1);
          }
      }
      ======== end of Checkbox0020.java ==========================================
      ======== output of Checkbox0020.java =======================================
       failed
      ======== end of output of Checkbox0020.java ================================
      ==================================================
      ======================================================================

            kdmsunw Kdm Kdm (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: