Hiding the mouse cursor in fullscreen mode

As the subject says: how do I hide the mouse cursor in fullscreen mode?

Replace the cursor with a custom cursor created from an empty transparent image.


setCursor(getToolkit().createCustomCursor(new BufferedImage(1,1,BufferedImage.TYPE_INT_ARGB),new Point(0,0),null));

Toolkit.getDefaultToolkit().createCustomCursor(Toolkit.getDefaultToolkit().createImage(""), new Point(), null);