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

Radio button triggers 'DESELECTED' item event when clicking second time, win32

XMLWordPrintable

    • x86
    • windows_xp

      I have a Checkboxgroup where I have added 4 checkboxes. I have added an ItemListener to each one of them. When I click one of the checkboxes (appear as a radio button) ITEM_STATE_CHANGED event is triggered with a state 'SELECTED'. When I click the same radio button again, it is triggering 'DESELECTED' item event, even though it is not actually deselected. This is valid for checkbox but not for a radio button. Radio button should not trigger any event when clicking on it for the second time.

      This is reproducible on Win32 platform only since JDK1.3.1 (could not regress it further). This is not reproducible on Solaris / Linux.

      I have attached a sample test. Execute the sample test. You would see 4 radio buttons. Select one of them. You will get an ItemEvent. Click on it again. If you see another item event being triggered, the bug is reproduced.

            dav Andrei Dmitriev (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: