JDK-6225679 : REG: Converting radio button to checkbox dynamically does not work properly in mustang, win32
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-02-04
  • Updated: 2011-01-19
  • Resolved: 2005-03-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b27Fixed
Related Reports
Relates :  
Description
Adding / Removing a checkbox from a checkbox group at runtime does not work properly. I am having a checkbox which is already added to a checkbox group. When the user clicks a button on the frame, I am setting it's checkbox group to null by calling Checkbox.setCheckboxGroup(null). When the user clicks the same button again, I am setting a valid checkbox group to this checkbox. What I am expecting here is that the checkbox should change to a radio button whenever it is added to a checkbox group and should become a normal checkbox when it's checkbox group is set to null. This does not seem to be happening. The checkbox retains it's old state until the user clicks it. 

This is reproducible only on Win32 and not on Solaris / Linux. This is reproducible atleast since Mustang-b15. I don't have other mustang builds to identify where exactly this was introduced. This is not happening on Tiger-FCS. So it must have been introduced somewhere in between Mustang b01-b15.  

I have attached a test. Run the test on WinXP. Select the last checkbox. Click on the button 'GetSelectedText'. The checkbox should change to a radio button. Click on the button again. The radio button should change back to Checkbox. If you don't see this, then the bug is reproduced.
###@###.### 2005-2-04 17:32:15 GMT

Comments
EVALUATION Regression of 5065001: wrong check (checkboxGroup != null) was added, and that prevented the checkbox to be updated on fly. This extra check should be removed. ###@###.### 2005-2-07 11:26:56 GMT
07-02-2005