using custom cursor image

I

Ian

Hi,
Is there a way to customise the cursor to use different images - I have a
number of gifs in the current directory of my source files which I would
like to use.

From what I understand of the API and the Java tutorial you can use the
various images/cursors from inside the API for cursors. But if I distribute
my program to another PC which does not have these images then the cursor
types may not be available(as not in their API images directory) . Basically
I need the cursor image to point to my gif file -- ./myImage.gif

Any pointers appreciated
regards
 
A

Andrew Thompson

...if I distribute
my program to another PC which does not have these images then the cursor
types may not be available(as not in their API images directory) . Basically
I need the cursor image to point to my gif file -- ./myImage.gif

Distribute the image in your .jar file,
use Class.getResource("/myImage.gif")
to get an URL and you are in business.
<http://www.physci.org/codes/javafaq.jsp#path>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top