Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating a custom cursor

843807Jul 8 2001 — edited Aug 13 2001
I've used the following code to create a customer cursor.

Toolkit tk= Toolkit.getDefaultToolkit();
Image image = tk.createImage("filename");
Cursor c = tk.createCustomCursor(image,new Point(1,1),"Hand_cursor");

Unfortunately, the call hangs in the createCustomCursor, with no messages whatsoever.

I have Windows 2000 pro and JDK 1.3.

Swing can display the images in, for example, a button.

The size of the cursor is 32X32

Anybody get this to work and have sample code?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2001
Added on Jul 8 2001
4 comments
138 views