Everytime I ran my project with setIcon on the JFrame, the Icon shows up but everything else inside of the JFrame disappear. When I resize the window everything appears again...
java.net.URL iconURL = getClass().getResource("/img/steam.png");
// iconURL is null when not found
ImageIcon icon = new ImageIcon(iconURL);
f.setIconImage(icon.getImage());
f.setVisible(true);
f.setSize(250,150);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
I've already tried with other types of code, nothing works properly, why maaan??