I'm trying to simply load a photo to jpanel but it is not working.
import java.awt.FlowLayout;
import java.awt.Toolkit;
import java.io.File;
import javax.swing.*;
public class ImageTest3 extends JFrame {
    public ImageTest3() {
        // TODO Auto-generated constructor stub
        JPanel panel = new JPanel(new FlowLayout());
        Icon icon = new ImageIcon(
                File.separator + "resources" 
                    + File.separator + "images"
                    + File.separator + "topbar.jpg");
        JLabel label1 = new JLabel();
        panel.add(label1);
        add(panel);
        label1.setIcon(icon);
        setSize(2000,700);
        setVisible(true);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        new ImageTest3();
    }
}
Sorry for the crappy form... 
The file is saved in my \src\resources\images\topbar.jpg
What am I doing wrong ?
I also had it as ImageIcon icon = new ImageIcon ....
 
    