• Post Reply Bookmark Topic Watch Topic
  • New Topic

setting mouse cursors to default in windows NT and Solaris  RSS feed

 
senthil sen
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Program opens a window with a button in the middle. If the button is clicked, the cursor of the window is changed to wait cursor(The cursor is in process) and a modal dialog is popped up. Another button is located in the dialog. If the dialog button is clicked, the cursor of the dialog is changed to wait cursor(The cursir is in process mode) and sleep for 3 seconds. After three seconds, the dialog is closed and the cursor of the main window is hanged to default cursor. The cursor will change back to default cursor if the mouse cursor stays inside the dialog before the dialog is closed. If the mouse cursor moves outside of the dialog, the cursor will not be changed until the mouse cursor moves out of the frame and comes back in. This problem does not happen in Windows NT since the cursor of the frame will not be changed to wait cursor at all.
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not the problem with OS. While changing the Mouse Cursor, you use setCursor() on Component - means you are setting different Mouse Cursor for that particular component only. When mouse enters another component, its cursor will be changed to the cursor set for that component.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!