I want to set an icon for a jlabel, can somebody give me example syntax
I have tried this :
JLabel icon = new JLabel();
ImageIcon chromo = createImageIcon("res/icon.png");
panel.add(icon);
icon.setIcon(chromo);
After I tried this the label didn't show up on the panel at all.