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!

Custom Cursor

843807Mar 2 2008
I have a semitransparent PNG which i want to use as a cursor. the size is 32x32 but as i assign it as a cursor it behaves as a GIF where only the completely transparent pixels are displayed transparent.


BufferedImage image = javax.imageio.ImageIO.read(new File("cursor.png"));
setCursor(Toolkit.getDefaultToolkit().createCustomCursor(image, new Point(1,1), "cursor"));


do you know how to use the semitranparency??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2008
Added on Mar 2 2008
0 comments
133 views