Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Making cursor invisible

  Asked By: Koila    Date: Nov 12    Category: Java    Views: 4026

I had put this question in 1 week back... Did not get
any replies...

Is there some way by which the cursor can be made



1 Answer Found

Answer #1    Answered By: Isra Demir     Answered On: Nov 12

To set the cursor  invisible, create a transparent image, then use the
Toolkit to create a custom cursor with that image.

// by leaving the int array as zeros, the image will be transparent
Image img = createImage(new MemoryImageSource(1, 1, new int[2], 0, 0));
Toolkit kit = Toolkit.getDefaultToolkit();
Cursor cursor = kit.createCustomCursor(img, new java.awt.Point(0,0),

Didn't find what you were looking for? Find more on Making cursor invisible Or get search suggestion and latest updates.