r/learnjava • u/DragonFistLimitless • 18d ago
Ubuntu apparently doesn't support icons but need confirmation
so I tried this code package test.GUI;
package test.GUI;
import static utility.Cout.coutln;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
public class Main{
public static void main(String[] args){
JFrame frame = new JFrame("this is an window:DD");
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(420, 420);
ImageIcon image = new ImageIcon("kuroicon.png");
frame.setIconImage(image.getImage());
}
}
but it seems that the window's icon isn't loading, which I believe is an OS restriction because Ubuntu only loads it's icons from .desktop files and MacOS doesn't support icons on windows at all, can anyone confirm me that is the cause? or there is another thing I am misurdentanding