show hourglass on each event that lasts longer than two seconds
Joined: Jun 26, 2012
I'm looking for a simple way to implement the hourglass when an event needs longer than two seconds to be processed. This should be done through the whole application which would mean a lot of effort to implement it as a listener(s). So i found this article about EventQueues and the automatic hourglass: Java Tip 87: Automate the hourglass cursor
... sound great, i just have to add the EventQueue and the hourglass pops up every time some event needs longer than two seconds. The problem is, it doesn't work. The only thing it does is showing the hourglass for a short period wenn i move the mouse over a component.
Are there any suggestions to solve this problem? Or does i have to implement the listener for each component/area of the application to show the hourglass if the application is processing an event (load items from db, sort, generate files, sync with active directory, ... and so on)?
An alternative would be to not think about the cursor and maybe consider displaying a status/progress bar or icon that shows that something is still going on in the background. Kind of like how browsers have animated icons that indicate when a page is still loading or how GMail will show a progress bar while its loading up your inbox. Those are things you have more control of than the user's cursor. Same approach as not trying to disable the user's browser Back or Refresh button. Leave the user's things alone, mess with your stuff instead.