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

Windows: Wrong mouse cursor set when drag-n-drop from a Choice

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      This behavior is reproducable from java 5.0 onwards on windows platform only

      I've a Button and a Choice in a Frame. I've set hand cursor on the Button. I'm doing a drag-n-drop from the Choice to the Button. Once the drag and drop is complete, the drop down of the Choice is visible and the cursor changes to hand cursor all over the frame.

      To reproduce:
      Run the below code and do a drag-n-drop from the Choice to the Button
      If the cursor changes to hand cursor everywhere on the Frame once the drop is complete, bug is reproduced.

      import java.awt.*;

      public class Test {
          public static void main(String[] args) {
              Frame f = new Frame();
              f.setLayout(new FlowLayout());
              Button b = new Button("Button");
              b.setCursor(new Cursor(Cursor.HAND_CURSOR));
              f.add(b);
              Choice ch = new Choice();
              ch.add("One");
              ch.add("Two");
              f.add(ch);
              f.setSize(200, 200);
              f.setVisible(true);
          }
      }

        Attachments

          Activity

            People

            Assignee:
            bagiras Oleg Pekhovskiy (Inactive)
            Reporter:
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: