************************************************************************
COMPLETE SOURCE CODE FOR : MakeCursorInvisible.java
************************************************************************
import java.awt.Toolkit;
import java.awt.Cursor;
import java.awt.Point;
import java.awt.Image;
import javax.swing.JFrame;
public class MakeCursorInvisible
{
//Create an empty byte array
byte[]imageByte=new byte[0];
Cursor myCursor;
Point myPoint=new Point(0,0);
//Create image for cursor using empty array
Image cursorImage=Toolkit.getDefaultToolkit().createImage(imageByte);
public MakeCursorInvisible()
{
//Create cursor
myCursor=Toolkit.getDefaultToolkit().createCustomCursor(cursorImage,myPoint,"cursor");
JFrame frame=new JFrame("Put your cursor into me");
//Set cursor for JFrame using created cursor(myCursor)
frame.setCursor(myCursor);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300,300);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
public static void main(String[]args)
{
MakeCursorInvisible mci=new MakeCursorInvisible();
}
}
************************************************************************
JUST COMPILE AND EXECUTE IT
************************************************************************