I cant seem to put images in a label. I have tried a lot of codes and still cant get it.... Any tips?
Here are some codes:
Code : lName.setIcon("./IMG/name_icon.jpg");
Error : setIcon(javax.swing.Icon) in javax.swing.JLabel cannot be applied to (java.lang.String)
Code : Image icon = createImageIcon("./IMG/name_icon.jpg");
lName = new JLabel(icon);
Error : cannot find symbol method createImageIcon(java.lang.String)
cannot find symbol constructor JLabel(java.awt.Image)