0

Why doesn't this work? (IconImage)

So I want that instead of the cup of coffe in my JFrame I want a icon but it won't pop up for some reason could someone help me? Script: setIconImage(new ImageIcon("/Click counter/Images/error.png").getImage());

2nd Mar 2019, 10:53 PM
Vanessa Nilsson
2 Answers
0
You can use this to change the icon: Image icon = Toolkit.getDefaultToolkit().getImage("your image"); frame.setIconImage(icon);
2nd Mar 2019, 11:45 PM
JavaBobbo
JavaBobbo - avatar
0
What are the dimensions of said image?
3rd Mar 2019, 12:21 AM
voidneo