This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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

Joined: Oct 16, 2003
Posts: 1101

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


Have you checked out Aspose?
subject: Need help with wait cursor and setEnable( false )
It's not a secret anymore!