-3

I have made a simple game using Java with the library slick. I noticed all the other games have little icons on them, for example Mine craft has the little dirt block. can anyone tell me how i can have one of those? thank you.

user3558075
  • 11
  • 1
  • 3

1 Answers1

0

From this other question.

URL url = ClassLoader.getSystemResource("path/to/icon.png");
Toolkit kit = Toolkit.getDefaultToolkit();
Image img = kit.createImage(url);
getFrame().setIconImage(img);
Community
  • 1
  • 1
Anubian Noob
  • 12,897
  • 5
  • 47
  • 69