File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Waiting cursor problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Waiting cursor problem" Watch "Waiting cursor problem" New topic

Waiting cursor problem

Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

Howdy Ranchers!

One more question about this f....riggin' GUI part of the task.

I'm trying to change the cursor to indicate that some computations are made in the background. I do this with:

I am executing this code when user hits 'close' button (action listener) or closes the window (window adapter). The point is that sometimes it shows waiting icon, and sometimes doesn't.

I don't have a clue why this happens - it is just a random - or more likely - once it works and then 4 times it doesn't...

Did anyone have some problem like that?

Roel De Nijs

Joined: Jul 19, 2004
Posts: 8379

Hi Pedro,

I find it quiet amusing to see you are about the GUI part of the assignment, but you are doing a whole lot extras in the GUI which are not intended, giving you a lot more trouble than you would have had if you kept it as simple as possible.

My GUI does not have a progressbar, cursor is not switching,... So my advice simply would be: if it does not work or you have to spend too much time, just do NOT do it If you want to go through with fancing your GUI, I think you should ask your questions in the dedicated Swing forum instead of this one, because chances to get a useful answer are a whole lot higher, certainly if you try to do things which are not required at all.

Kind regards,

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

I've decided not to use the waiting cursor at all - the shutdown operation is not so time consuming to be honored with waiting cursor :-) (I will document it in choices)

Yeah Roel - the GUI part is taking me definitely too much time. DB, Data class, BLL was a pleasure to solve. GUI is a horror... I guess I'll just cut what I have to the minimum in the sake of simplicity.
I agree. Here's the link:
subject: Waiting cursor problem
It's not a secret anymore!