Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Koila Malik   on Nov 12 In Java Category.

  
Question Answered By: Isra Demir   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),
"Transparent");
setCursor(cursor);

Share: 

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


Tagged: