• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom Cursor

 
Louis Kounios
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, guys!

I've been trying to change the cursor for my JFrame and after searching online, I think I've figured out how to do it. The problem is that the cursor appears in black and white. Here's my code:
The important stuff:Can anyone see what I've done wrong? I tried with a .gif image as well and I also tried reducing the size to 32x32 from 100x100, but the image is still in black and white.

Thanks in advance,
Louis.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the image you are trying to use?
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you add a JLabel with an ImageIcon wrapped around the Image? Does that too appear in black or white, or does that have full colour?
 
Louis Kounios
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply, lads.

My initial suspicions were correct: nothing to do with the coding, much to do with the image. I simply used an image with less colours. It looks crap, but at least it works now.

Thanks again,
Louis.
 
zm khan
Greenhorn
Posts: 9
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no point of using png files as a cursor image if you on are windows platform.Look at this
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!