aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to set up a hourglass? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to set up a hourglass?" Watch "How to set up a hourglass?" New topic
Author

How to set up a hourglass?

bo chang
Greenhorn

Joined: May 14, 2003
Posts: 4
I have a Java Swing Applet Application. I want to know how to setup a hourglass during the program perform a big task.
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
Moving to Swing/JFC/AWT forum...


Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
martin chile
Greenhorn

Joined: Jun 24, 2002
Posts: 21
You have to do this by your own. put the setCursor() in a thread to simulate the moving.
here some code:
Cursor cur = getToolkit().createCustomCursor(
new ImageIcon("hourglass01.gif").getImage(), new Point(10,10), "Cursor");
setCursor(cur);
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Use (Hourglass cursor):
setCursor(new Cursor(Cursor.WAIT_CURSOR));
When done:
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set up a hourglass?