aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Need help with wait cursor and setEnable( false ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need help with wait cursor and setEnable( false )" Watch "Need help with wait cursor and setEnable( false )" New topic
Author

Need help with wait cursor and setEnable( false )

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
Hi guys,

Please help me with an issue I have. I have a button and when user click it, it does some calculation in another thread and I am doing fine on that part. But I want the cursor to change to hour glass and also setEnable( false ). I don't know why but when I first click the button, the cursor is changed to hour glass but as soon as I move the mouse, it change back to the default. My component on the screen will not be enable until the other thread has finish the calculation. Here is the code



what I really confused about is when I comment out


the cursor will stay as hour glass and will not change back until the calculation has completed. but this is not desireable because even if the cursor is hour glass, the user can still click a button and leave the screen before the calculation has completed. Please help me if you have any experience with issue before.

Thank you
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1083
    
  10

Your call to set the cursor is correct.
But, the following line should be changed
Davie Lin wrote:

to:


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help with wait cursor and setEnable( false )