United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5005195 : CheckboxMenuItem fires action events

Details
Type:
Bug
Submit Date:
2004-02-28
Status:
Resolved
Updated Date:
2005-07-23
Project Name:
JDK
Resolved Date:
2005-07-23
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description
Name: agR10216			Date: 02/28/2004


Run the manual regression test test/java/awt/Frame/MenuCrash with the tiger
b39 with MAWT. The instructions for a tester says:
"Try mousing around the menus and choosing various items to see the menu
item name reflected in the text field. Note that CheckBoxMenuItems do
not fire action events so the check menu item will not change the field."
However, selecting a CheckBoxMenuItem does fire an action event.

###@###.### 2004-02-28
======================================================================

                                    

Comments
SUGGESTED FIX

*** /net/karanar/export/vb157120/ml/webrev/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java-  2005-06-10 19:34:18.968483000 +0400
--- /net/karanar/export/vb157120/ml/webrev/src/solaris/classes/sun/awt/X11/XCheckboxMenuItemPeer.java   2005-06-10 19:34:18.929561000 +0400
***************
*** 107,117 ****
          XWindow.postEventStatic(e);
          //WToolkit does not post ActionEvent when clicking on menu item
          //MToolkit _does_ post.
!         //Looks like we should reproduce MToolkit's behavour and
!         //event should be posted here
!         XWindow.postEventStatic(new ActionEvent(cb, ActionEvent.ACTION_PERFORMED,
!                                                 getTargetActionCommand(), when,
!                                                 0));
      }
  
  } // class XCheckboxMenuItemPeer
--- 107,117 ----
          XWindow.postEventStatic(e);
          //WToolkit does not post ActionEvent when clicking on menu item
          //MToolkit _does_ post.
!         //Fix for 5005195 MAWT: CheckboxMenuItem fires action events  
!         //Events should not be fired
!         //XWindow.postEventStatic(new ActionEvent(cb, ActionEvent.ACTION_PERFORMED,
!         //                                        getTargetActionCommand(), when,
!         //                                        0));
      }
  
  } // class XCheckboxMenuItemPeer

###@###.### 2005-06-10 15:36:41 GMT
                                     
2005-06-10
EVALUATION

Name: rpR10076			Date: 02/28/2004


We'll fix it in dragonfly.
###@###.###


======================================================================
                                     
2004-09-07
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mustang


                                     
2004-09-07



Hardware and Software, Engineered to Work Together