When I start my application, the icon on the desktop looks like this:
I want to know if there is a way I can change that image to an image of my choosing?
When I start my application, the icon on the desktop looks like this:
I want to know if there is a way I can change that image to an image of my choosing?
Give this a try.
frame.setIconImage(new ImageIO.read(new File("res/game.png")));
where res/game.png is the icon image you want to use
https://docs.oracle.com/javase/7/docs/api/javax/swing/ImageIcon.html#ImageIcon(java.lang.String)
https://docs.oracle.com/javase/tutorial/uiswing/components/frame.html
frame.setIconImage(new ImageIcon(getClass().getResource("logo.png")).getImage()
This works when the image is in the same package as the class. Note: It is better to have images in a resource folder