Article View: borland.public.jbuilder.java.language
Article #17005Re: Mouse cursor
From: B. Callaway
Date: Sat, 26 Dec 1998 00:00
Date: Sat, 26 Dec 1998 00:00
37 lines
1310 bytes
1310 bytes
Jonathan wrote in message <75qkos$c2d8@forums.borland.com>...
>I have an application which retrieves data from a database on a server,
>however, due to the time of retrieval (a few secs) i want to show an egg
>timer (Wait Cursor),
>
>But i want this cursor to change for the whole desktop while data is being
>retrieved
>
>
>can anyone help?
>
>jonathan
>
>
Hi,
Try adding a "finally" clause to your try/catch statement, something
like:
try
{
this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
// access the database
}
catch (Exception e)
{
// exception handling
}
finally
{
// then when you're done
this.setCursor(Cursor.getPredefinedCursor (Cursor.DEFAULT_CURSOR));
}
Hope this helps!
Technical Details
Message-ID:
<762h3q$iui1@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<75qkos$c2d8@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,299ea39a994d682b X-Google-Attributes: gidf74b3,public From: "B. Callaway" <bdcallaway@iname.com> Subject: Re: Mouse cursor Date: 1998/12/26 Message-ID: <762h3q$iui1@forums.borland.com> X-Deja-AN: 425898392 References: <75qkos$c2d8@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language