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.
Asked
Active
Viewed 141 times
-3
-
Try Google or so and youll find. Like this: http://stackoverflow.com/questions/209812/how-do-i-change-the-default-application-icon-in-java – maximus_de May 12 '14 at 21:36
-
Before asking any question,firstly search on Google. – TeachMeJava May 12 '14 at 21:51
1 Answers
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
- 13,426
- 6
- 53
- 75