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

LIST_SELECT event not triggered when Return key selects

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris

      Description

      When the return key is pressed with a listbox as its target, the list box element
      is selected, but no LIST_SELECT event is triggered.

      CODE:
      public boolean handleEvent(Event evt){
          switch(evt.id){
          case Event.LIST_SELECT:
                 System.out.println("List Element Selected "+evt.arg);
                 break;

          case Event.LIST_DESELECT:
                 System.out.println("List Element Deselected: "+evt.arg);
                 break;

          case Event.KEY_PRESS:
            System.out.println("Key Pressed: "+evt.key+" "+evt.target);
          break;
          }
      }
      Retruns the following output:

      Action: Response:
      --------------------------------

      Click Element: List Element Selected 1
      Space Bar Press: Key Pressed: 32 java.awt.List[483,88,139x34,selected=Deny All]
      List Element Deselected: 1
      Space Bar Press: Key Pressed: 32 java.awt.List[483,88,139x34,selected=null]
      List Element Selected 1
      Space Bar Press: Key Pressed: 32 java.awt.List[483,88,139x34,selected=Deny All]
      List Element Deselected: 1
      Return Press: Key Pressed: 10 java.awt.List[483,88,139x34,selected=null]
      Return Press: Key Pressed: 10 java.awt.List[483,88,139x34,selected=Deny All]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dcherepanov Dmitry Cherepanov
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: