I'm new to the Java Swing Package and I am trying to build a basic application. I want to change the dock icon on MacOS from the basic Java logo to my own and I tried using the code below but nothing changes. And this is the dock icons. I'm using MacOS 12.0.1 and Java SE 17.
var image = new ImageIcon("Content.png");
frame.setIconImage(image.getImage());
Can anyone help?