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

MouseExit event is not triggered when mouse is moved away from the choice popup

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_10

      Description

      I have a choice added to a frame. I have added MouseListener to the choice. Moving the mouse on the choice triggers mouse enter event, moving mouse away from the choice triggers mouse exit event. But the same events are not triggered when i open the choice's popup & move the mouse in & out on the choice' popup, i can see only mouse enter event, but no mouse exit event is triggered. I would expect both mouse enter & mouse exit events.

      Step to Reproduce:
      ---------------------
      1) Run the attached program.
      2) Move the mouse on the choice, Observe that mouse enter event is triggered.
      3) Move the mouse away from the choice, Observe that mouse exit event is triggered.
      4) Click on the choice, so that choice popup can be seen.
      5) move the mouse from choice to popup. Observe that mouse exit & mouse enter events are triggered.
      6) Move the mouse away from the choice's popup. No events are triggered.
      7) Move the mouse on the choice's popup. Observe that mouse enter event is triggered.

      I tested this on mustang b98 on solaris 10.


      testcase
      ---------
      import java.awt.Choice;
      import java.awt.Frame;

      public class ChoiceMouseListener {
      private Frame frame = null;
      private Choice ch = null;
      ChoiceMouseListener() {
      frame = new Frame();
      frame.setLayout(new java.awt.FlowLayout());
      ch = new Choice();
      ch.add("One");
      ch.add("Two");
      ch.add("Three");
      ch.add("Four");
      ch.add("Five");
      ch.add("Six");
      ch.add("Seven");
      ch.add("Eight");
      ch.add("Nine");
      ch.add("Ten");
      ch.add("Eleven");
      ch.addMouseListener(new java.awt.event.MouseAdapter(){
      public void mouseEntered(java.awt.event.MouseEvent me){
      System.out.println("Entered");
      }
      public void mouseExited(java.awt.event.MouseEvent me){
      System.out.println("Exited");
      }
      });
      frame.add(ch);
      frame.setSize(200,200);
      frame.setVisible(true);
      }
      public static void main(String []args){
      new ChoiceMouseListener();
      }
      }

        Attachments

          Activity

            People

            • Assignee:
              dav Andrei Dmitriev (Inactive)
              Reporter:
              lpremkumsunw Lawrence Premkumar1 (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: