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

CURSOR DOES NOT CHANGE BACK TO AN HOURGLASS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.0, 1.4.2
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt, windows_xp

      Description

      Name: pa48320 Date: 11/29/2001

      (this bug has been created to track an issue for the JInitiator Replacement
      Project. please direct any questions to ###@###.###)

      Happens only on Windows. And does not happen on solaris or
      sunray client.

      JDK version: JDK1.4.0 build 84

      Steps to reproduce:
      -------------------
      Busy cursor is not restored in an application when the
      mouse re-enters the application. When there is a long query,
      Oracle Forms set the cursor to busy cursor. At this time, if
      the user goes out of the application form, and comes back
      while it is still performing the query, the cursor is not
      set busy.

      The cursor remains as an arrow head or a two headed.
      However this problem does not happen on Solaris.

      A JDK only test case is provided below.

      -----------------CursorTest.java----------------------------
      import java.applet.*;
      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;

      public class CursorTest extends Applet
                            implements ActionListener,
                                       MouseMotionListener {
       public void init() {
         System.out.println("Inside init");
         createFrame();
       }
       public void start(){
         System.out.println("CursorTest started");
       }
       public void stop(){
         System.out.println("CursorTest Stopped");
       }
       private void createFrame() {
         theFrame =new JFrame();
         JButton b = new JButton("PushMe");
         theFrame.setBounds(getBounds());
         theFrame.getContentPane().add(b,BorderLayout.SOUTH);
         b.addActionListener(this);
         theFrame.setTitle("Hello World");
         theFrame.setVisible(true);
         theFrame.addMouseMotionListener(this);
       }
       private boolean _inAction = false ;
       private JFrame theFrame;
       public void actionPerformed(ActionEvent evt)
       {
         theFrame.setCursor(Cursor.WAIT_CURSOR);
         _inAction = true ;
         System.out.println("I am Pushed");
         for ( double i = 0.0 ; i < 99.0 ; i+=0.1 ){
           for ( double j = 0.0 ; j < 99.0 ; j+=0.1 ) {
                // just do something
                String HelloWorld = new String("HelloWorld") ;
                byte[] HelloWorldByteArray = HelloWorld.getBytes() ;
           }
          }
          _inAction = false ;
          theFrame.setCursor(Cursor.DEFAULT_CURSOR);
        }
        public void mouseDragged(MouseEvent evt)
        {
        }
        public void mouseMoved(MouseEvent evt)
        {
         if ( theFrame != null )
         {
           if ( _inAction )
              theFrame.setCursor(Cursor.WAIT_CURSOR);
           else
              theFrame.setCursor(Cursor.DEFAULT_CURSOR);
         }
         else
           System.out.println("The Frame is null");
        }
       public static void main(String [] args)
       {
        CursorTest ct = new CursorTest();
        ct.init();
        ct.theFrame.setSize(400,400);
        ct.theFrame.validate();
       }
      }
      -----------------CursorTest.java----------------------------
      (Review ID: 134857)
      ======================================================================
      I can reproduce this bug when running awt manual test.

      JDK : JDK1.4.1 b21, JDK1.4.2 b25
      Platform[s] : Windows 2003 (32/64), Windows XPpro
      switch/Mode : -cleint -Xmixed
      test harness : tonga 1.2 (52)
      testbase : /net/cady/export/dtf/unified/knight-ws/suites/awt/testbase
      testcase : AWT_Hopper_WS/CursorManagement/src/Interactive/4650763/BusyCursorTest.html

      The cursor becomes ResizeCursor instead of BusyCursor.
      ###@###.### 2003-06-03

      Given a Tonga test (AWT_Hopper_WS/CursorManagement/src/Interactive/4650763/BusyCursorTest.html) I could reproduce the bug with 1.4.2, but couldn't with 1.5

      ###@###.### 2004-08-24

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              pallenba Peter Allenbach (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: