my dog learned polymorphism
The moose likes Swing / AWT / SWT and the fly likes Set Wait Cursor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Set Wait Cursor " Watch "Set Wait Cursor " New topic

Set Wait Cursor

Nandini Chakrabarty

Joined: Jun 22, 2001
Posts: 4
Threre are two Buttons("Save", "Message").If a click "Save" button - it starts to find a particular file from my directory.If file is not there - wait cursor will appear-if file is there wait cursor became default cursor.My main problem is -my wait cursor does not work on window. How can I do it?please give me some solution as early as possible.

My Existing code is as follows -

Thank you.

Welcome to the javaranch.
When posting long code (actually any code) please use the [ code ] openinig and closing tags (without the spaces) so that the code is properly formated. Also, I have deleted your other two (exact same) posts -
post once read from anywhere.
Hope you like this place.
Thanks for your cooperation.
- satya

[This message has been edited by Madhav Lakkapragada (edited June 22, 2001).]
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Nandini,
I think all you need to do is inside your actionPerformed method is to get the button parent (which should be CursorDemo) and call the setCursor on it.

Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

knock knock....
pl continue the discussion here....
- satya

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: Set Wait Cursor
It's not a secret anymore!