import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; @SuppressWarnings(\"serial\") public class Picture e
Try:
ImageIcon image = new ImageIcon(getClass().getResource("TestImage.jpg"));
See How to Use Icons tutorial for more details, in particular Loading Images Using getResource section.