JDK-6638103 : JRE 5.0 Update 14 - checkbox within an applet is not updating properly
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0u14
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: generic
  • Submitted: 2007-12-05
  • Updated: 2011-02-16
  • Resolved: 2009-03-19
Related Reports
Relates :  
Relates :  
Relates :  
Check and uncheck the checkbox within an applet and sometimes it stays at check state and
won't toggle for a number of times. To reset, you just need to click enough
times to change the state.  The Problem exists with JRE 5.0 Upd 14 and not with upd 11.

A check box which is not inside of an applet doesn't appear to exhibit the problem.

The customer has given us access to a test case.  In order to reproduce the problem, please see the information in the comments section of this report.
I'm attaching a screen shot of the applet with the checkbox that is exhibiting problems.

EVALUATION There is a possible workaround for the issue. Swing fires the action events for the checkbox as a result of the mouse pressed|released events inside the JToggleButton.setPressed method. In our case the checkbox losts the focus when the checkbox receives mouse pressed|released event. During the focus lost event Swing unsets the 'armed' variable (BasicButtonListener.lostFocus method) and it stops Swing from sending the action event (changing the state of the checkbox). A possible w/a for the issue is to skip unsetting the 'armed' variable in case of toggle button during the lost focus event. I don't know if there is any regression of the change.

EVALUATION see 6562716