Hi,
I've done a fair bit with swing and whenever there is some heavy
backend work I make use of swingworker to help me out. However I am
working on a system at the moment where the result of pressing ok in a
Jframe results in a message being sent to a remote box and the
confirmation result comes back aysnchronously via another message. I
want to display success or fail via a dialogue but while waiting stop
the use from being about to use the GUI and also popup a busy cursor.
Also if after a specified time the response message doesn't appear
display fail in the dialog.
Anybody come across this problem before, have any tips, links ?????
Thanks in advance
Steve
Vova Reznik - 25 May 2006 14:43 GMT
> Hi,
>
[quoted text clipped - 13 lines]
>
> Steve
You may cover your JFrame with glass pane
(see JFrame#setGlassPane(Component))
with any cursor and in the same time start
swing Timer with delay you want. Timer will set
glass pane invisible after "specified time".
Don't forget to add to your glass pane all empty mouse and key listener
to block any user interaction.
swebb99@gmail.com - 25 May 2006 17:04 GMT
Thanks for that Vova that would seem to work for what I want the only
thing I would have to add is a mechanism for associating the response
coming back with the GUI component awaiting the response.
Cheers
Steve
Vova Reznik - 25 May 2006 17:13 GMT
> Thanks for that Vova that would seem to work for what I want the only
> thing I would have to add is a mechanism for associating the response
[quoted text clipped - 3 lines]
>
> Steve
Simple call back function. You may use delegate
in SwingWorker#finished().