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

setCursor' call does not change the cursor on NT - jdk1.1fcs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Duplicate
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      solaris_2.5.1

      Description


      Essentially, the 'setCursor' call does not change the cursor unless the mouse
      is moved. This happens only on NT.

      In this example, Hit the "Start Busy" button to start the busy cursor.
      Then take your hand away from the mouse and watch the messages in the console
      window. When the program is done sleeping, you will see a "Done Sleeping"
      message in the console window, but the hourglass stays. If you now move the
      mouse, the hour-glass will change back to a pointer.


      import java.lang.*;
      import java.awt.*;
      import java.awt.event.*;

      public class cursortest extends Frame implements WindowListener, ActionListener
      {
      Button bdat= new Button("Start Busy");
      public cursortest()
      {

      bdat.addActionListener(this);
      Panel p = new Panel();
      p.setLayout( new BorderLayout() );

      add( p );
      p.add( "North", bdat );
      p.add( "Center", new TextArea( 20, 20 ) );
      addWindowListener(this);
      }

      public void windowClosed(WindowEvent event) {
      }

      public void windowOpened(WindowEvent event) {
      }

      public void windowIconified(WindowEvent event) {
      }

      public void windowDeiconified(WindowEvent event) {
      }

      public void windowActivated(WindowEvent event) {
      }

      public void windowDeactivated(WindowEvent event) {
      }

      public void windowClosing(WindowEvent event) {
      System.exit(0);
      }

      public void actionPerformed( ActionEvent event)
      {
      Object source = event.getSource();
      if ( source == bdat)
      {
      setCursor( Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) );
      System.out.println("Starting Sleep for 5 seconds ...");
      System.out.println("Remember to remove your hand from the mouse");
      try { Thread.sleep(5000); } catch( InterruptedException e ){ }
      System.out.println("Done sleeping");
      setCursor( Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR ) );
      }
      }

      public static void main( String args[] )
      {
      Frame f = new cursortest();
      f.setSize( 200, 200 );
      f.show();
      }
      }


      Is this going to be fixed in the next release of jdk(1.1.1)?
      Several groups at Cadence cannot release their products without this fix.

      __Nasser


      nasser.nouri@Corp 1997-03-20

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tballsunw Tom Ball (Inactive)
              Reporter:
              nnouri Nasser Nouri
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: