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

fp.bugs 3415 : Win32 HAND_CURSOR, MOVE_CURSOR does not change cursor

XMLWordPrintable

    • 1.0.2
    • x86
    • generic
    • Verified

      I would submit this as two bugs but the similiarity is such that the same engineer will likely do both. Let me know for future reference if you would have prefered separate bugs in such a case.
      Summary: Test 'cursor.java' below allows selection of cursor type via button clicks. Under Solaris, everything works. Under Win32 environments, MOVE_CURSOR and HAND_CURSOR do not change the default cursor appearance.

      //cursor.java

      public class cursor extends Frame {
        public static void main(String argv[]) {
          new cursor();
        }

        private Button b1, b2, b3, b4, b5;

        public cursor() {
          setLayout(new FlowLayout());
          b1 = new Button("Hand");
          b2 = new Button("Move");
          b3 = new Button("Text");
          b4 = new Button("Wait");
          b5 = new Button("Default");

          add(b1);
          add(b2);
          add(b3);
          add(b4);
          add(b5);
          
          show();
          resize(100, 200);
          validate();
        }

        public boolean action(Event e, Object obj) {
          if (e.target == b1)
            setCursor(Frame.HAND_CURSOR);
          else if (e.target == b2)
            setCursor(Frame.MOVE_CURSOR);
          else if (e.target == b3)
            setCursor(Frame.TEXT_CURSOR);
          else if (e.target == b4)
            setCursor(Frame.WAIT_CURSOR);
          else if (e.target == b5)
            setCursor(Frame.DEFAULT_CURSOR);
          return true;
        }
      }

            egilbertsunw Eric Gilbertson (Inactive)
            bhagen Benjamin Hagen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: